Skeleton

A set of loading placeholder components that mimic content shapes while data is being fetched.

Installation

npx dafink-ui add skeleton

Demos

Skeleton

The base block. Compose it freely with width, height, and className to match any shape.

SkeletonCard

Mimics a card with a title bar and a configurable number of body lines.

SkeletonInput

Mimics a labelled form input. Pass label to include the label placeholder.

SkeletonForm

Stacks multiple labelled SkeletonInput fields; useful while a form section loads.

SkeletonImage

Rectangular image placeholder. Height derives from aspectRatio and the element's width.

SkeletonTableRow

A row of equal-width columns; stack several to simulate a full table body.

Props

NameTypeDefaultDescription
widthstring-CSS width applied inline on the base Skeleton block.
heightstring-CSS height applied inline on the base Skeleton block.
classNamestring""Additional classes for sizing and shaping (all variants).
linesnumber3SkeletonCard: number of body text lines to render.
labelbooleanfalseSkeletonInput: whether to show a label placeholder above the input.
fieldsnumber3SkeletonForm: number of labelled input fields to render.
columnsnumber4SkeletonTableRow: number of equal-width column blocks per row.
aspectRatiostring"16/9"SkeletonImage: CSS aspect-ratio value controlling height relative to width.