Thrive Design System

Components

Spinner

An animated loading indicator that communicates ongoing processing or data fetching.

Installation

npm install @thrivecart/ui
yarn add @thrivecart/ui
pnpm add @thrivecart/ui
bun add @thrivecart/ui

Usage

import { Spinner } from '@thrivecart/ui';

Examples

Sizes

Spinner Sizes

Available from extra small to extra large

Loading...Loading...Loading...Loading...Loading...
<div className="flex items-center gap-4">
<Spinner size="xs" />
<Spinner size="sm" />
<Spinner size="md" />
<Spinner size="lg" />
<Spinner size="xl" />
</div>

With Label

Labeled Spinner

Spinner with visible descriptive text

Loading contacts...
<Spinner size="md" label="Loading contacts..." showLabel />

Best Practices

Add context with labels

Tell users what is loading when the spinner is the primary content indicator.

Match size to context

Use xs/sm for inline or button loading, md/lg for section loading, xl for full-page.

Don't use for known layouts

If you know the content shape, use Skeleton instead for a smoother experience.

Don't block the entire page

Prefer localized spinners over full-page overlays when possible.

Props

Props

Accessibility

  • Has role="status" to announce loading state to screen readers.
  • The label prop provides aria-label for context.
  • Visually hidden text "Loading" is announced by default.