dist/codex/shopify-commerce/skills/shopify-polaris/SKILL.md
Build Shopify app UIs with Polaris — component categories, Web Components transition, React legacy components, App Design Guidelines, accessibility, @shopify/draggable, and design tokens. Use when building Shopify admin app interfaces.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins shopify-polarisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
https://polaris.shopify.com/ for Polaris component documentation and examplessite:shopify.dev polaris app design guidelines for design guidelinessite:shopify.dev polaris web components migration for migration statussite:polaris.shopify.com components for current component APIs and propssite:polaris.shopify.com tokens for current design token valuesShopify's design system for building admin app UIs:
IMPORTANT: Polaris React is in maintenance mode. Shopify is transitioning to Polaris Web Components. Check current migration status before choosing components.
Page — top-level page container with title and actionsLayout — two-column annotated layoutCard — content container with sectionsBox — flexible container with spacing/colorInlineStack — horizontal layoutBlockStack — vertical layoutDivider — visual separatorGrid — CSS grid layoutButton — primary, secondary, destructive actionsButtonGroup — group related actionsActionList — dropdown menu of actionsPopover — dropdown containerNavigation — sidebar navigationTabs — tabbed contentPagination — page navigationTextField — text inputSelect — dropdown selectCheckbox — boolean inputRadioButton — single selectionChoiceList — radio/checkbox groupsDatePicker — date selectionDropZone — file uploadForm — form containerFormLayout — form field arrangementBanner — info, success, warning, critical messagesToast — temporary notificationsBadge — status indicatorsSpinner — loading stateSkeletonPage / SkeletonBodyText — loading placeholdersProgressBar — progress indicatorIndexTable — resource list with bulk actions (primary list component)DataTable — simple tabular dataResourceList — list of resources (legacy, prefer IndexTable)ResourceItem — individual resource entryDescriptionList — key-value pairsEmptyState — no-content placeholderThumbnail — small imageModal — dialog overlaySheet — side panel (deprecated in React, check Web Components)Fetch live docs for current component APIs and props — components are updated frequently. Always check
https://polaris.shopify.com/componentsbefore using any component.
// Pattern: standard Polaris page layout
// Fetch live docs for current Page, Card, and BlockStack props
<Page title="Products" primaryAction={{ content: "Add product", onAction: handleAdd }}>
<Layout>
<Layout.Section>
<Card>
<BlockStack gap="300">
<Text variant="headingMd">Product List</Text>
{/* IndexTable or content here */}
</BlockStack>
</Card>
</Layout.Section>
<Layout.Section variant="oneThird">
<Card>
<Text variant="headingMd">Filters</Text>
</Card>
</Layout.Section>
</Layout>
</Page>
// Pattern: form with validation
// Fetch live docs for current TextField, Select, and Form props
<Form onSubmit={handleSubmit}>
<FormLayout>
<TextField label="Product name" value={name} onChange={setName} autoComplete="off" />
<Select label="Status" options={statusOptions} value={status} onChange={setStatus} />
<Button submit variant="primary">Save</Button>
</FormLayout>
</Form>
// Pattern: Banner for persistent messages, Toast for transient
<Banner title="Order shipped" tone="success" onDismiss={handleDismiss}>
<p>Tracking number: {trackingNumber}</p>
</Banner>
// Toast via App Bridge (not Polaris component in embedded apps)
shopify.toast.show("Product saved");
Consistent design values used across all Polaris components:
| Category | Token Pattern | Examples |
|----------|--------------|---------|
| Colors | --p-color-bg-*, --p-color-text-* | --p-color-bg-surface, --p-color-text-critical |
| Spacing | --p-space-* | --p-space-100 (4px) through --p-space-1200 (48px) |
| Typography | --p-font-size-*, --p-font-weight-* | --p-font-size-300, --p-font-weight-bold |
| Border | --p-border-radius-* | --p-border-radius-200 |
| Shadow | --p-shadow-* | --p-shadow-100, --p-shadow-200 |
Fetch live docs for current token values and names — token naming conventions change across Polaris versions. Check
https://polaris.shopify.com/tokens.
Shopify's drag-and-drop library:
Fetch live docs: Web-search
site:github.com shopify draggablefor current API and examples.
Polaris components are built with accessibility:
Fetch live docs: Web-search
site:polaris.shopify.com accessibilityfor current accessibility guidelines and component-specific a11y notes.
IndexTable for resource lists (not DataTable for CRUD interfaces)Banner for persistent messages, Toast (via App Bridge) for transient confirmationsSkeletonPage, SkeletonBodyText) for loading statesPage → Layout → Card → content hierarchyBlockStack and InlineStack for layout (not CSS flex/grid directly)Fetch the Polaris documentation for exact component APIs, design tokens, prop types, and Web Components migration status before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.