Xzero UI
Pro library

Skeleton

Reserve space while content is still loading.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/skeleton
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/skeleton

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { Skeleton } from "@/components/xzero/skeleton/skeleton";

export function Profile({ user }: { user?: User }) {
  return (
    <Skeleton avatar lines={2} loading={!user}>
      {user && <ProfileCard user={user} />}
    </Skeleton>
  );
}

API reference

Skeleton

A pulsing placeholder of text lines and an optional avatar that can crossfade into the loaded content.

PropTypeDefaultDescription
labelstring"Loading content"aria-label of the loading status.
linesnumber3Number of text lines, clamped to 1-6.
avatarbooleanfalseAdds a round avatar placeholder.
childrenReactNode–Content to reveal once loading finishes. With children the placeholder crossfades into them.
loadingbooleantrueKeeps the placeholder visible while true. Only used with children.
classNamestring–Class on the outer element.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in progress

Guidance for AI tools

Skeleton: Reserve space while content is still loading. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components