Umbra UI

Skeleton

A placeholder for content that is loading.

Staticimport { Skeleton } from 'umbra-ui'

Props

PropTypeDefaultDescription
animated booleantrueDisables the pulse. It is always off under `prefers-reduced-motion`.
height string | number—CSS height (number = px). Defaults to one line of text.
variant "circle" | "rect" | "text"text`text` matches a line of text, `rect` is a block, `circle` an avatar.
width string | number—CSS width (number = px). Defaults to 100% (`circle`: its height).

Usage notes

Size it to match the content it stands in for.

Accessibility

  • Skeletons are aria-hidden. Mark the loading region with aria-busy="true" and a label.
  • The pulse stops under prefers-reduced-motion.

Import

import { Skeleton } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app