Skip to content

Data display

Skeleton

Skeletons hold the shape of content while it loads, so the layout doesn't jump when data arrives. Use the Skeleton block to sketch any layout, or the presets for text, avatars, cards and tables. A slow, subtle shimmer shows that something is happening and stops for people who prefer reduced motion.

On this page
Loading dashboard

Usage

components/ui/skeleton.tsx
import { Skeleton, SkeletonGroup, SkeletonText } from "@/components/ui/skeleton"; <SkeletonGroup label="Loading profile">  <Skeleton shape="circle" className="size-10" />  <SkeletonText lines={2} /></SkeletonGroup>

Examples

Overview

Loading dashboard

Text

SkeletonText draws lines of slightly different widths, with a shorter last line like real text.

Loading
Loading

Avatar

A round placeholder with one or two lines, for comments, members and notifications.

Loading
Loading
Loading

Card

Matches the Card layout, with or without media on top.

Loading
Loading

Table

A header row and body rows with varied widths; the last column is right-aligned like amounts.

Loading invoices

Loading to content

Keep the placeholder the same size as the content it stands in for, so nothing shifts on swap.

Loading
Loading

Props

Skeleton

  • shape"rect" | "text" | "circle"default: "rect"rect follows the theme radius, text is a 12 px line, circle is round.
  • classNamestringdefault: —Size it with width and height classes.
  • styleCSSPropertiesdefault: —Inline size when it is computed.

SkeletonGroup

  • labelstringdefault: "Loading"Announced once for the whole group.
  • classNamestringdefault: —Layout classes.

Presets

  • SkeletonText linesnumberdefault: 3Number of lines.
  • SkeletonAvatar size / lines"sm" | "md" | "lg" / 0 | 1 | 2default: "md" / 2Avatar size and text lines next to it.
  • SkeletonCard mediabooleandefault: trueInclude the 16:9 media block.
  • SkeletonTable rows / columnsnumberdefault: 5 / 4Grid size.
  • labelstringdefault: "Loading"Every preset is its own status region with this label.

Accessibility

  • Skeleton blocks are hidden from assistive tech; there is nothing to read in a grey bar.
  • SkeletonGroup and the presets are a role="status" region with one visually hidden label, so a screen reader hears "Loading invoices" once instead of nothing or noise.
  • Set aria-busy on the region that is loading and remove it when content arrives.
  • The shimmer is a slow, low-contrast sweep and stops entirely under prefers-reduced-motion.
  • Colors mix the foreground into transparency, so placeholders read on every surface in light and dark.

Suggested