Skip to content
Porcelana

Skeleton

Pulsing placeholders while content loads.

Data & display

Example

Example.tsx
import { Skeleton } from "@porcelana/ui";

export default function Example() {
  return (
    <div role="status" aria-busy="true" aria-label="Loading alarms" style={{ display: "flex", gap: 12, alignItems: "center", maxWidth: 420 }}>
      <Skeleton circle height={44} />
      <div style={{ flex: 1, display: "grid", gap: 8 }}>
        <Skeleton width="70%" />
        <Skeleton width="45%" />
      </div>
    </div>
  );
}

Import

Import
import { Skeleton } from "@porcelana/ui";
import "@porcelana/ui/styles.css"; // once, at your app root

Props

Generated from the TypeScript types. Standard HTML attributes are passed through and not listed.

Skeleton

Loading placeholder. Hidden from assistive tech; announce loading state on the container (aria-busy).

PropTypeDefaultDescription
aria-labelstring–Defines a string value that labels the current element. @see aria-labelledby.
circleboolean–Round placeholder, e.g. for an avatar.
heightHeight<string | number>12CSS height; also the diameter of a circle.
idstring–Element id. Generated automatically when omitted.
widthWidth<string | number>100%CSS width, e.g. 120 or "70%".

Accessibility

  • Hidden from screen readers; mark the loading region with aria-busy and a label instead.
  • The pulse stops when reduced motion is on.