Feedback
Skeleton
Shimmering placeholder for content that is loading.
import { Skeleton } from "datui";Playground
<Skeleton width={160} height={16} visibilityDelay={0} />Examples
Loading card
Accessibility
- Skeletons are
aria-hidden; setaria-busyon the region that is loading. - The shimmer stops under
prefers-reduced-motionand withnoAnimation.
API
Skeleton
Loading placeholder. Without children it is a block sized by `width`/`height`; with children it is an inline line of text height. Hidden from assistive tech — set `aria-busy` on the loading region.
| Prop | Type | Default | Description |
|---|---|---|---|
| borderRadius | Length | — | |
| className | string | — | |
| colorFrom | string | — | Shimmer start/end colors (CSS colors). Default to the skeleton tokens. |
| colorTo | string | — | |
| duration | number | — | Shimmer cycle in seconds. |
| height | Length | — | |
| margin | Length | — | |
| maxWidth | Length | — | |
| noAnimation | boolean | — | Static block without shimmer. Reduced-motion users always get this. |
| visibilityDelay | number | — | Stay invisible for this many ms so fast loads don't flash. |
| width | Length | — |