Skip to content
Components / Collections

Skeleton

A placeholder while the first response is still loading.

@fabrials/ui
Loading state

Loading account summary

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { Skeleton } from "@fabrials/ui";
  2. Or install it under shadcn's name, so code that imports @/components/ui/skeleton gets this control. See shims.

    npx shadcn@latest add @fabrials/skeleton

API reference

Prop / exportTypeDescription
classNamestringSet the height and width of the placeholder.

Behavior

Use a skeleton for the first load. A later refresh keeps the last value and says when it is stale.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.