Skeleton
Holds the place of content that is still loading.
Installation
Terminal
npm i @uisatin/uiImport
import { Skeleton } from '@uisatin/ui/skeleton'About 9.6 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
Terminal
npx shadcn@latest add https://uisatin.dev/r/skeleton.jsonAdds skeleton.tsx to components/ui.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The Skeleton component renders an aria-hidden div in one of three shapes. Put aria-busy on the region that is loading.
| Prop | Type | Default |
|---|---|---|
shape | "text""circle""rect" | "text" |
animated | boolean | false |
width | numberstring | — |
height | numberstring | — |
className | string | — |
ref | Ref<HTMLDivElement> | — |
...props | ComponentProps<'div'>Other attributes go to <div> | — |
Accessibility
Every block is aria-hidden, so screen readers skip it. Put aria-busy="true" on the region that is loading and take it off when the content arrives.
Something wrong or missing on this page?
Report a problemSuggest an improvement