Hewn
Components

Components

Skeleton

Placeholder blocks for loading layouts.

newfree

Install

@hewnui/ui · hewnui

Terminal
npm install @hewnui/ui
Terminal
pnpm add @hewnui/ui
Terminal
yarn add @hewnui/ui
Terminal
bun add @hewnui/ui
Terminal
npx hewnui@latest add skeleton

Skeleton is a lightweight pulse surface. Compose multiple blocks to match content geometry.

Usage

TSX
import { Skeleton } from "@hewnui/ui";

<Skeleton className="h-4 w-full" />

Accessibility

  • Skeleton is aria-hidden — it is decorative geometry, never an announcement
  • Because it is silent, pair it with a live region so screen reader users learn that content is loading:
TSX
<div role="status" aria-live="polite">
  <span className="sr-only">Loading rows…</span>
  <Skeleton className="h-4 w-full" />
  <Skeleton className="h-4 w-2/3" />
</div>
  • Remove the live region once the real content lands, or the announcement repeats
  • The pulse is a CSS animation and is suppressed by prefers-reduced-motion

API reference

Props for Skeleton from @hewnui/ui/skeleton. Generated from component types — not hand-written.

Prop

Type

On this page