Search documentation

Search pages, components, blocks, styles and colours.

Get started
Skip to content

Spinner

PreviousNext

Twenty-two loading animations, from dot matrices to bouncing dots and turning tiles.

Orbit
Ripple
Cascade
Wave
Pulse
Braid
Comet
Bounce
Equalizer
Flip
Scan
Quad swap
Quad fold
Tic tac
Bloom
Checker
Diagonal
Triangle
Square
Rings
Hex
Ring

Installation

bunx --bun fabricator-ui@latest add spinner

Usage

import { Spinner } from "@/components/ui/spinner"
<Spinner />

Patterns

Orbit is the default. Set variant on a single spinner to choose another pattern.

<Spinner variant="orbit" />
<Spinner variant="ripple" />
<Spinner variant="cascade" />
<Spinner variant="wave" />
<Spinner variant="pulse" />
<Spinner variant="braid" />
<Spinner variant="comet" />
<Spinner variant="bounce" />
<Spinner variant="equalizer" />
<Spinner variant="flip" />
<Spinner variant="scan" />
<Spinner variant="quad-swap" />
<Spinner variant="quad-fold" />
<Spinner variant="tic-tac" />
<Spinner variant="bloom" />
<Spinner variant="checker" />
<Spinner variant="diagonal" />
<Spinner variant="triangle" />
<Spinner variant="square" />
<Spinner variant="rings" />
<Spinner variant="hex" />
<Spinner variant="ring" />
VariantMotion
orbitA bright trail circles twelve dots.
rippleAn expanding wave pushes the matrix outward.
cascadeShort columns rain down in staggered bursts.
waveFive dots ride a travelling sine wave.
pulseA diamond of tiles expands and contracts as one.
braidTwo strands cross over and under each other.
cometA sharp tail chases the square perimeter.
bounceThree dots jump and squash on landing.
equalizerFive bars stretch in syncopated beats.
flipFour tiles turn edge-on, then open again.
scanA three-dot beam sweeps from side to side.
ringThe classic rotating arc.

Grid sizes and geometry

Choose a compact matrix or a shaped layout. Triangle and Hex use polygon tiles as well as matching arrangements.

VariantLayoutMotion
quad-swap2×2Four tiles trade corners.
quad-fold2×2Four tiles fold into the centre and open.
tic-tac3×3Three rows light up in sequence.
bloom3×3Nine dots burst outward.
checker4×4Alternating tiles shrink and turn.
diagonal4×4A diagonal wave zips across sixteen tiles.
triangleTriangleTen triangular tiles follow a three-sided trail.
squareSquare outlineTwelve tiles expand and contract as one frame.
ringsConcentric circlesSix inner dots and twelve outer dots run opposite trails.
hexHexagonal latticeNineteen hexagonal cells swell in a honeycomb wave.

Project default

Choose Spinner in the Look step on Get started or in the settings on App Shell. The previews follow your choice, and the install command saves it for every <Spinner /> without a variant.

bunx --bun fabricator-ui@latest create my-app --spinner ripple
npx fabricator-ui@latest init --spinner braid --yes

The CLI also asks for a default spinner during interactive setup. These are copy-in components; no spinner package is required. An explicit variant always overrides the project default.

Speed and motion

speed={1} is a 1.1-second cycle. Lower values slow it down; higher values speed it up. Set animated={false} to show a still pattern.

<Spinner variant="ripple" speed={0.6} />
<Spinner variant="ripple" speed={1.5} />
<Spinner variant="ripple" animated={false} />

Spinners stop under reduced motion or data-motion="off", retaining a visible loading indicator. Transition speed settings do not change the loading cycle.

Accessibility

The SVG has role="status" and aria-label="Loading". Give it a label that describes the work, such as aria-label="Uploading file". When adjacent text already describes the state, use aria-hidden="true" to avoid duplicate announcements. Pair a still spinner with visible loading text.

Inspiration

Dot Matrix by Shawn prompted this collection. Fabricator's patterns and animation code are original implementations; no Dot Matrix source is included.

Size

Use the size-* utility class to change the size of the spinner.

Button

Add a spinner to a button to indicate a loading state. Place the <Spinner /> before the label with data-icon="inline-start" for a start position, or after the label with data-icon="inline-end" for an end position.

Badge

Add a spinner to a badge to indicate a loading state. Place the <Spinner /> before the label with data-icon="inline-start" for a start position, or after the label with data-icon="inline-end" for an end position.

SyncingUpdatingProcessing

Input Group

Validating...

Empty

Processing your request
Please wait while we process your request. Do not refresh the page.