Skeleton
A placeholder shape while content loads.
When to use
- Use when
- Holding the shape of content while it loads, so the layout doesn't jump.
- Avoid when
- Loading takes a moment and has no layout to hold; use Spinner.
Installation
The source lands in src/components/ui/skeleton.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Built on
- Packages
@stylexjs/stylex- Shelf items
foundations,utils- Figma
- Optional native Figma library. See Designers.
Verified
- Size
- 0.6 kB gzipped on its own, 2.3 kB with the Shelf items and packages it builds on. JS and CSS in a production build, without React.
- Accessibility
- Axe passes on 1 story
- Behavior
- 1 interaction test in Storybook
- React Compiler
- Compiles with React Compiler
- React Doctor
- React Doctor finds nothing