Skeleton

Placeholder lines in the shape of content that is loading.

Loading your profile
Loading tasting notes
import { Skeleton } from '@brand-studio/ui';

export default function SkeletonDemo() {
  return (
    <div style={{ display: 'grid', gap: 24, width: '100%', maxWidth: 380 }}>
      <Skeleton avatar lines={2} label="Loading your profile" />
      <Skeleton lines={3} label="Loading tasting notes" />
    </div>
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { Skeleton } from '@brand-studio/ui';
<Skeleton avatar lines={2} label="Loading your profile" />

Accessibility

  • Screen readers hear label once through role="status". The grey shapes are hidden from them.
  • The shimmer stops under reduced motion; the shapes stay.
  • Match the shape of the content that replaces it, so the page does not jump when it loads.

API Reference

PropTypeDefault
lines?number3
avatar?booleanfalse
label?string'Loading'
className?string''

Still, Deskhand and Hollis are fictional brands. The coffee photographs are original generated artwork. @brand-studio/ui is MIT licensed.