Skeleton tabs
Placeholder tabs that hold the shape of a card's tab strip while the real tabs and their content load.
Preview
Code
Example.jsx
import { Card, Box, BlockStack, InlineStack, SkeletonTabs, SkeletonBodyText, SkeletonDisplayText, SkeletonThumbnail, Divider } from '@shopify/polaris';
const ORDER_ROWS = ['1042', '1041', '1040', '1039'];
export const Example = () => (
<BlockStack gap="400">
<Card padding="0">
<SkeletonTabs count={4} />
{ORDER_ROWS.map((row, index) => (
<BlockStack key={row} gap="0">
{index > 0 && <Divider />}
<Box padding="400">
<InlineStack gap="400" blockAlign="center" wrap={false}>
<SkeletonThumbnail size="extraSmall" />
<Box width="100%">
<SkeletonBodyText lines={2} />
</Box>
</InlineStack>
</Box>
</BlockStack>
))}
</Card>
<Card padding="0">
<SkeletonTabs count={3} fitted />
<Box padding="400">
<BlockStack gap="400">
<SkeletonDisplayText size="small" />
<SkeletonBodyText lines={3} />
</BlockStack>
</Box>
</Card>
</BlockStack>
);