v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Skeleton

Quiet loading shapes that reserve space while real content arrives.

Interactive preview

Loading profile

Usage

import { Skeleton } from "@devvy-ui/react";

<section aria-busy={loading} aria-label="Profile">
  {loading ? <Skeleton variant="rect" height={120} /> : <p>Profile loaded.</p>}
</section>

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
varianttext | circle | recttextPlaceholder shape.
animatedbooleantrueOpacity pulse; disabled automatically for reduced motion and forced colors.
width / heightCSSProperties dimensionsshape defaultReserve the expected content dimensions. style can override.

Accessibility & behavior

Platform Behavior & Guidelines

Always decorative and aria-hidden. No children, focus or interaction API. Put aria-busy on the enclosing content region and provide one readable loading status outside it. Replace shapes with content when ready. Error and disabled states belong to that content, not to the skeleton. Supports span refs, className, style and theme variables.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add skeleton

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Skeleton.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.