Skip to main content

Web components

Polaris provides a library of web components for your app to display data, get input from merchants, and trigger API calls. These components follow Shopify's design system, ensuring that your app looks and feels native to the Shopify admin.


Anchor to Adding Polaris to your appAdding Polaris to your app

When you scaffold your app using Shopify CLI, Polaris is added to your app automatically, set up with polaris-1.js to follow the newest stable release of Polaris version 1. The snippets on this page load polaris-1.1-rc.js instead, because this reference documents the 1.1 release candidate.

You can also manually add Polaris in any framework by adding a script tag to your app's HTML head. There are two kinds of URL to choose between:

  • polaris-1.1-rc.js names a specific release, the 1.1 release candidate that this reference documents. Load it to build against the components described here.
  • polaris-1.js is a channel. It always serves the newest stable release in Polaris 1, and it's what we recommend for production.

To build against the components this reference documents, load the release candidate:

<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/polaris-1.1-rc.js"></script>
</head>
// app/root.tsx
export default function App() {
return (
<html>
<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/polaris-1.1-rc.js" />
</head>
</html>
);
}

For production, load the stable channel instead:

<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/polaris-1.js"></script>
</head>
// app/root.tsx
export default function App() {
return (
<html>
<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/polaris-1.js" />
</head>
</html>
);
}

The following table shows the different options for configuring your script tag and the version of the library that is served.

Script tagServesNotes
polaris-1.jsThe newest stable release in Polaris 1, currently 1.0Advances each time a new 1.x release goes stable
polaris-1.1-rc.jsThe 1.1 release candidateAccumulates compatible changes and bug fixes until 1.1 goes stable
polaris-1.1.jsPolaris 1.1, once its release candidate is promotedSecurity fixes only
polaris-1.0.jsPolaris 1.0, released in 2025Frozen as released
polaris.jsThe legacy unversioned entry point, currently 1.0Advances to 1.1 when 1.1 goes stable, then tracks 1.x. Never serves 2.x

Anchor to Stable releases and release candidatesStable releases and release candidates

For production, we recommend the stable channel, polaris-1.js. It always serves the newest stable release in Polaris 1, so bug fixes, accessibility improvements, and new components reach your app without a script-tag change.

Each stable release is also published at its own URL, like polaris-1.0.js and, once 1.1 is promoted, polaris-1.1.js. Published stable versions are immutable except for critical security fixes, ensuring that your app continues using the version of the library you tested against. If you need to control exactly when your app moves, name a specific version instead of the channel.

Promotion doesn't update the release candidate URL in place. The stable release publishes at its own URL instead, so moving to it is a change you make in your app's code: update the script tag to polaris-1.1.js for that release, or to polaris-1.js to follow the channel.

For the fuller story on how Polaris is versioned on the CDN, see The Polaris CDN is adopting semantic versioning.


Anchor to Available componentsAvailable components

Action components let users trigger events, perform tasks, and navigate through the interface.

Anchor to Feedback and status indicatorsFeedback and status indicators

Feedback and status indicators display information about the status of resources and actions.

Form components capture user input with built-in validation and formatting.

Anchor to Layout and structureLayout and structure

Layout components create consistent visual hierarchy and organize content into clear structures.

Media and visual components display images, icons, and visual elements that enhance the interface.

Overlay components display content above the page in focused, contextual layers.

Anchor to Typography and contentTypography and content

Typography components display and format text content with consistent styling.


Was this page helpful?