datui
Color scheme

Feedback

Skeleton

Shimmering placeholder for content that is loading.

import { Skeleton } from "datui";

Playground

<Skeleton width={160} height={16} visibilityDelay={0} />

Examples

Loading card

Accessibility

  • Skeletons are aria-hidden; set aria-busy on the region that is loading.
  • The shimmer stops under prefers-reduced-motion and with noAnimation.

API

Skeleton

Loading placeholder. Without children it is a block sized by `width`/`height`; with children it is an inline line of text height. Hidden from assistive tech — set `aria-busy` on the loading region.

PropTypeDefaultDescription
borderRadiusLength—
classNamestring—
colorFromstring—Shimmer start/end colors (CSS colors). Default to the skeleton tokens.
colorTostring—
durationnumber—Shimmer cycle in seconds.
heightLength—
marginLength—
maxWidthLength—
noAnimationboolean—Static block without shimmer. Reduced-motion users always get this.
visibilityDelaynumber—Stay invisible for this many ms so fast loads don't flash.
widthLength—