Skip to content
Storybook

Skeleton

Loading placeholder that mirrors the final layout, with a shimmer.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Usage

  • Respect prefers-reduced-motion (handled).

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

API reference

Class / attributeTypeDescription
px-skeleton--text · --heading · --circle · --rect · --buttonclassShape.

Figma properties

Skeleton5 variants · page “Progress Bar”Open

Loading placeholder that mirrors the final layout. Animate a --px-skeleton-highlight shimmer (respect prefers-reduced-motion) and set aria-busy on the container.

PropertyTypeValues
ShapeVariantText Heading Circle Rectangle Button
Skeleton / Card2 variants · page “Progress Bar”Open

Example composition: card loading state built from Skeleton shapes. In RTL, short last lines align to the right.

PropertyTypeValues
DirectionVariantLTR RTL

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-skeleton-radiusradius-sm4px

Accessibility

  • Set aria-busy="true" on the loading container.