- Docs
- Components
- Feedback
Skeleton
A placeholder shaped like the content that's loading, so the page doesn't move when it lands.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<span aria-hidden="true">Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Shapes
text, one line; lines, a paragraph whose last line is shorter; block for a card or image; circle for an avatar.
<Skeleton />
<Skeleton lines={3} />
<Skeleton variant="block" style={{ blockSize: 96 }} />
<Skeleton variant="circle" />02
Avatar sizes
size, with a circle: the diameter of an Avatar of the same size.
<Skeleton variant="circle" size="sm" />
<Skeleton variant="circle" />
<Skeleton variant="circle" size="lg" />
<Skeleton variant="circle" size="xl" />03
A card loading
Shaped like what's coming. It's hidden from screen readers: mark the region aria-busy and say the wait once.
Profile
Loading Priya Sharma's profile
<Stack gap="md" aria-busy="true">
<VisuallyHidden><Text role="status">Loading Priya Sharma's profile</Text></VisuallyHidden>
<Inline gap="sm" wrap={false}>
<Skeleton variant="circle" size="lg" />
<Stack gap="xs" style={{ flex: 1 }}>
<Skeleton style={{ inlineSize: "55%" }} />
<Skeleton style={{ inlineSize: "35%" }} />
</Stack>
</Inline>
<Skeleton lines={3} />
</Stack>