Spinner

A turning ring with a label, for a wait of unknown length.

Checking stockLoading orders
import { Spinner } from '@brand-studio/ui';

export default function SpinnerDemo() {
  return (
    <div style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'center', gap: 32 }}>
      <Spinner label="Checking stock" />
      <Spinner size={32} label="Loading orders" hideLabel />
    </div>
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { Spinner } from '@brand-studio/ui';
<Spinner label="Checking stock" />

Accessibility

  • The label sits in a role="status" region. hideLabel keeps it for screen readers only.
  • Under reduced motion the ring stops turning and the label carries the meaning.
  • Use Skeleton when you know the shape of what is loading, and Button's loading prop for a pressed button.

API Reference

PropTypeDefault
label?string'Loading'
hideLabel?booleanfalse
size?number20
className?string''

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