PPolaris ComponentsConnect an agent

Spinner

An animated indicator that tells merchants a short, indeterminate wait is in progress, in a small inline size and a large page-level size.

Preview

Code

Example.jsx
import { Card, Box, BlockStack, InlineStack, Text, Spinner, Divider } from '@shopify/polaris';

export const Example = () => (
  <BlockStack gap="400">
    <Card>
      <BlockStack gap="300">
        <Text as="h2" variant="headingMd">
          Sales by channel
        </Text>
        <Divider />
        <Box paddingBlock="800">
          <InlineStack align="center" blockAlign="center">
            <BlockStack gap="200" inlineAlign="center">
              <Spinner size="large" accessibilityLabel="Loading sales by channel" />
              <Text as="p" tone="subdued">
                Crunching the last 30 days
              </Text>
            </BlockStack>
          </InlineStack>
        </Box>
      </BlockStack>
    </Card>

    <Card>
      <BlockStack gap="300">
        <Text as="h2" variant="headingMd">
          Small
        </Text>
        <InlineStack gap="200" blockAlign="center">
          <Spinner size="small" accessibilityLabel="Syncing inventory" />
          <Text as="span" tone="subdued">
            Syncing inventory with your point of sale
          </Text>
        </InlineStack>
      </BlockStack>
    </Card>
  </BlockStack>
);