Skip to content

Skeleton

Shimmering placeholder block for content that hasn't loaded yet.

View as Markdown

Preview

Text line placeholders

<span class="nx-skeleton" style="display:block;height:12px;
    width:80%"></span>
<span class="nx-skeleton" style="display:block;height:12px;
    width:55%"></span>

API

React props (NxKit)

React (NxKit) props
PropTypeDefaultRequiredDescription
widthnumber|string"100%"CSS width.
heightnumber|string14CSS height.
radiusnumber8Border radius.

Classes

Framework-agnostic classes
ClassDescription
.nx-skeletonSurface-2 bg, shimmer sweep, reduced-motion aware

Accessibility

  • Rendered aria-hidden (NxSkeleton sets it). Pair with a visually-hidden text announcement elsewhere (e.g. a table caption) if the loading state itself needs to be announced.

Do / Don’t

  • Do: Match the skeleton's shape to the real content it replaces.Don't leave skeletons on screen past the real load. Always swap to content or an empty state.

View in spec