Dither Skeleton
Size it like any block and it shows a light field of dots, a slow wave of density drifting across it where other skeletons shimmer grey. When loading turns false the content doesn't pop in: it resolves out of the stipple, each dither cell handing over at its own blue-noise threshold, so the dots dissolve exactly where the content appears. Rounded corners are dithered too.
Needs: None. Canvas 2D and a CSS mask.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| loading | boolean | required | Whether the content is still on its way. |
| children | ReactNode | – | The real content, once there is some. |
| radius | number | 6 | Corner radius in px. |
| cell | number | 3 | Size of one dither pixel in px. |
| tone | string | – | The stipple's colour. The muted text colour by default. |
| label | string | "Loading" | What's loading, for screen readers. |
| className | string | – | Class on the block: give it a size while it loads. |
| style | CSSProperties | – | Style on the block. |