Skeleton body text
Placeholder lines that stand in for paragraphs while a card's content loads, keeping the layout from jumping when the real text arrives.
Preview
Code
Example.jsx
import { Card, Box, BlockStack, InlineStack, SkeletonBodyText, SkeletonDisplayText, SkeletonThumbnail, Divider } from '@shopify/polaris';
const ACTIVITY_ROWS = ['sync', 'payout', 'refund'];
export const Example = () => (
<BlockStack gap="400">
<Card>
<BlockStack gap="400">
<SkeletonDisplayText size="small" />
<SkeletonBodyText lines={3} />
</BlockStack>
</Card>
<Card padding="0">
<BlockStack gap="0">
<Box padding="400">
<SkeletonDisplayText size="small" />
</Box>
<Divider />
{ACTIVITY_ROWS.map((row, index) => (
<BlockStack key={row} gap="0">
{index > 0 && <Divider />}
<Box padding="400">
<InlineStack gap="400" blockAlign="center" wrap={false}>
<SkeletonThumbnail size="small" />
<Box width="100%">
<SkeletonBodyText lines={2} />
</Box>
</InlineStack>
</Box>
</BlockStack>
))}
</BlockStack>
</Card>
<Card>
<BlockStack gap="200">
<SkeletonBodyText lines={1} />
</BlockStack>
</Card>
</BlockStack>
);