4.2.0
Core

Spinner

A rotating ring that marks work in progress and says nothing about how long.

Spinner

`animate-spin` is core Tailwind, so it survives where `animate-in` and `fade-in-0` emit nothing here. The stroke is `currentColor`, so the mark takes the ink of whatever it sits in — and under `prefers-reduced-motion` it stops turning and stays a ring with a gap, which still reads as waiting.

Loading

Usage

import { Spinner } from '@oceanic-hub/brand-system'

Reach for it beside a trigger or in a status line the moment a request is in flight and you do not yet know its shape or its length — a button mid-submit, a background job a reader is watching. It is not a loading STATE for content you already know the shape of; that is Skeleton, which traces the real layout so nothing jumps when data arrives. And it is not a result: if the request has finished and there is genuinely nothing to show, that is Empty, which states the fact in words rather than implying a wait that has already ended.

There is no variant and no way to swap the mark for a different icon. Upstream's Customization example replaces the default glyph; ours has none to replace — Spinner IS a LoaderCircle, sized through lucide's own size prop, and a caller wanting a different weight or colour reaches for className (the stroke is currentColor) rather than a second icon. A caller wanting a determinate value instead of "in progress" wants Progress, which this package ships beside this one — and which keeps value={null} as a real indeterminate state rather than collapsing it to a 0% bar.

It composes into an Empty region, and there it is just a spinner sized to its ground — no demo, because it teaches nothing past what a status line already shows. Not into a Badge: an in-flight label is the lifecycle state StatusPill already owns through inFlight, which is Badge's own refusal. InputGroup's own page carries the addon version, where the composition is the point.

RTL is not supported. Nothing in this package has ever been laid out or measured right-to-left; the refusal is package-wide, recorded in pairings.json under direction (@OCE-1779).

Sizes

size is lucide's own prop, never h-4 w-4 — the package-wide icon rule. It takes a number or a string, so a size can come from a design token as easily as a literal pixel count.

In a button

Disable the button for the duration so a second click cannot queue a second submit, and pass a sentence through aria-label when "Loading" would not tell a screen reader what is actually happening.

Beside a status line

A quieter placement than a button: the mark sits at text-ink-faint and the sentence carries the actual information, which is what the mark itself deliberately does not.

Warming the sending domain — day 6 of 14, 200 per day.

API Reference

See the Spinner API page for every prop of every part, with types, defaults and the contract that pins them.

On this page