Weftv0.4.0
GitHubFigma
Blade AI
Display & Navigation · Skeleton Loaderstable

Skeleton Loader

Pulsing placeholder blocks that hold the shape of content while it loads, from single rectangles and circles to ready-made table, KPI, chart and list patterns.

Preview

#preview

Switch the placeholder shape and pulse. Show code opens the React and CSS below.

rectangle · pulse on
skeleton-loader-example.tsx
import { SkeletonRegion, Skeleton } from "@blade-ai/weft/components/skeleton-loader";

export function Loading() {
  return (
    <SkeletonRegion accessibilityLabel="Loading payouts">
      <Skeleton width={240} height={16} />
    </SkeletonRegion>
  );
}

All states

#all-states

Rectangle, circle and text blocks, the static variant, and the four composed patterns.

Skeleton Loader · 10 variants
Rectangle
Circle
Text · 3 lines
Text · 1 line
Static (no pulse)
Large circle
Table row
List item
KPI card
Chart card

Props

#props

Skeleton, SkeletonText, SkeletonRegion and four pattern components share this file.

Skeleton
Prop
Type
Default
Description
shape
"rectangle" | "circle"
"rectangle"
circle is a round avatar placeholder (width = height).
width
number | string
100%
CSS width: a number is px. Circle defaults to its height, else 40px.
height
number | string
16px
CSS height: a number is px.
isStatic
boolean
false
Turn the pulse off, for example when many blocks sit on screen. The pulse also stops for reduced motion.
SkeletonText
Prop
Type
Default
Description
lines
number
3
Number of text lines. Widths step down 100% / 90% / 60%; the last line is the shortest.
width
number | string
240
Width of the block.
className
string
—
Extra classes.
SkeletonRegion
Prop
Type
Default
Description
accessibilityLabel
string
"Loading"
Announced while loading.
children
ReactNode
—
The skeletons that make up the loading area.
SkeletonTableRow, SkeletonKpiCard, SkeletonChartCard, SkeletonListItem
Prop
Type
Default
Description
className
string
—
Extra classes. The patterns take no other props: table row 56px tall, KPI card 240px, chart card 420px, list item 48px tall.

Usage

#usage

Short rules for using skeleton loader.

Do
Match the placeholder to the real layout so nothing jumps.
Wrap a loading area in SkeletonRegion.
Use isStatic when many blocks sit on screen.
Swap to real content as soon as it arrives.
Don't
Don't use skeletons for quick loads under a second.
Don't use them for actions; use Spinner.
Don't make them interactive.
Don't mix them with real content in one block.

Accessibility

#accessibility

Skeletons are decorative. Wrap a loading area in SkeletonRegion so assistive tech hears one status.

Keyboard
Key
Action
—
Not focusable. Skeletons are decorative and take no keyboard input.
ARIA
Element
Role / attribute
When
Skeleton and patterns
aria-hidden="true"
Always; hidden from assistive tech.
SkeletonRegion
role="status", aria-busy="true", aria-label
Always; label defaults to "Loading".
Pulse
prefers-reduced-motion
Animation stops for reduced motion.