Component librarySkeleton
Skeleton
FreeLoading placeholders with a shared shimmer and content reveal.
npx shadcn@latest add https://tidalui.com/r/skeleton.jsonInstallation
Terminal
Import components/ui/tidal.css, components/ui/skeleton.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
TidalSkeleton: optional width/height (CSS lengths or numbers), shape line|rounded|circle, animated(defaulttrue), native div attributes/ref/style/className. Decorative and aria-hidden; style overrides width/height. TidalSkeletonRegion: required label, controlled loading, placeholder:ReactNode and children. Optional loadingLabel/readyLabel, announce(defaultfalse), animateHeight(defaulttrue), native div attributes/ref/className/style. Placeholder is inert and aria-hidden; only loaded children enter the accessible tree. Children unmount on reload; lift persistent state above the region. A ResizeObserver interpolates natural height, using layout measurements that ignore ancestor transforms. Disable animateHeight for externally fixed or overflowing content. Keep placeholders shaped like the expected content; caller owns fetching, errors and actual data. Sweeps run only while loading and stop under reduced motion, which shows final geometry immediately.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.