Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Spinner

Use the Spinner component to notify buyers that their action is being processed. Spinners are typically used for page or section loading states when sending or receiving data from a server.

Support
Targets (50)

Supported targets


Anchor to accessibilityLabel
accessibilityLabel
string

A label that describes the purpose or contents of the element. When set, it will be announced to users using assistive technologies and will provide them with more context. When set, any children or label supplied won't be announced to screen readers.

Anchor to appearance
appearance
'accent' | 'monochrome'
Default: 'accent'

The visual appearance of the spinner icon.

  • accent: Uses the accent color to convey emphasis and draw attention.
  • monochrome: Inherits the color of its parent element.
string

A unique identifier for the component. Use this to target the component in scripts or stylesheets, or to distinguish it from other instances of the same component.

'extraSmall' | 'small' | 'large' | 'base' | 'fill'
Default: 'base'

The size of the spinner icon.

  • extraSmall: The smallest size for tight spaces or inline indicators.
  • small: A compact size for secondary loading states.
  • base: The default size, suitable for most use cases.
  • large: A larger size for more prominent loading states.
  • fill: Expands to fill the available space.

Basic Spinner

Example

Basic Spinner

import {
reactExtension,
Spinner,
} from '@shopify/ui-extensions-react/checkout';

export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);

function Extension() {
return <Spinner />;
}
import {extension, Spinner} from '@shopify/ui-extensions/checkout';

export default extension('purchase.checkout.block.render', (root) => {
const spinner = root.createComponent(Spinner);

root.appendChild(spinner);
});

ValueDescription
"accent"Conveys emphasis and draws attention to the element.
"monochrome"Takes the color of its parent.


Was this page helpful?