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, the Polaris library is added to your app automatically. You can also manually add Polaris in any framework by adding the following script tag to your app's HTML head:

<head>
<meta name="shopify-api-key" content="%SHOPIFY_API_KEY%" />
<script src="https://cdn.shopify.com/shopifycloud/polaris.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.js" />
</head>
</html>
);
}

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.

CheckboxCheckbox

Checkbox

Give users a clear way to make selections, such as agreeing to terms or choosing multiple items.

SelectSelect

Select

Let users pick one option from a menu.

SwitchSwitch

Switch

Give users a clear way to toggle options on or off.

Choice listChoice list

Choice list

The choice list component presents multiple options for single or multiple selections.

Color fieldColor field

Color field

The color field component allows users to select colors through an integrated color picker or direct text input.

Color pickerColor picker

Color picker

The color picker component allows users to select colors from a visual color palette interface.

Date fieldDate field

Date field

The date field component captures date input with a consistent interface for date selection and proper validation.

Date pickerDate picker

Date picker

The date picker component allows merchants to select dates using a calendar interface.

Drop zoneDrop zone

Drop zone

The drop zone component lets users upload files through drag-and-drop or by clicking to browse.

Email fieldEmail field

Email field

The email field component captures email address input.

Money fieldMoney field

Money field

The money field component collects monetary values from users with built-in currency formatting and validation.

Number fieldNumber field

Number field

The number field component captures numeric input with built-in number validation.

Password fieldPassword field

Password field

The password field component securely collects sensitive information from users.

Search fieldSearch field

Search field

The search field component captures search terms for filtering and search functionality.

Text areaText area

Text area

The text area component captures multi-line text input.

Text fieldText field

Text field

The text field component captures single-line text input.

URL fieldURL field

URL field

The URL field component collects URLs from users with built-in formatting and validation.

Anchor to Layout and structureLayout and structure

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

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

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

Anchor to Typography and contentTypography and content

Typography components display and format text content with consistent styling.


Was this page helpful?