Skip to content
Nana UI

Skeleton

A placeholder that mimics the shape of content while it loads. Supports text lines, circles (avatars), and rectangles (images/cards) with shimmer, pulse, or wave animations. When loading becomes false the skeleton fades out smoothly.

Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/skeleton";
<nana-skeleton style="width:220px;height:1rem"></nana-skeleton>

Use count to render several placeholder lines.

PropertyTypeDefaultDescription
shape'text' | 'circle' | 'rect''text'Shape of the skeleton placeholder
size'sm' | 'md' | 'lg''md'Relative size
animation'shimmer' | 'pulse' | 'wave' | 'none''shimmer'Animation style — shimmer, pulse, wave, or none
countnumber1Number of skeleton items to render
loadingbooleantrueWhen false the skeleton fades out and slotted content is visible
SlotDescription
(default)Optional content revealed when loading completes
VariableDefaultDescription
--nana-skeleton-radiusCorner radius override
--nana-skeleton-heightHeight override
--nana-skeleton-widthWidth override
--nana-skeleton-gapGap between items when count > 1
--nana-skeleton-fade-durationFade-out transition duration (default 200ms)
PartDescription
baseEach skeleton item
wrapperThe container wrapping all items (when count > 1)
Explore Skeleton interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook