gridland
Components

Spinner

An animated loading indicator with 5 built-in variants

An animated loading indicator with 5 built-in animation styles selectable via the variant prop.

Spinner
?

Run demo

Terminal
bunx @gridland/demo spinner
Terminal
curl -fsSL https://raw.githubusercontent.com/thoughtfulllc/gridland/main/scripts/run-demo.sh | bash -s spinner

Installation

bunx shadcn@latest add @gridland/spinner

Usage

import { Spinner } from "@/components/ui/spinner"
<Spinner text="Loading..." />
Spinner
?

Examples

Variants

Use the variant prop to change the animation style.

dots · pulse · meter · bloom · ellipsis

With variant
<Spinner variant="bloom" text="Fetching data..." />
<Spinner variant="pulse" text="Building" />
<Spinner variant="ellipsis" text="Please wait" />
Spinner
?

Custom Color

Use the color prop to override the default theme color.

Custom color
<Spinner variant="pulse" text="Building" color="#05FFA1" />
<Spinner variant="dots" text="Compiling" color="cyan" />
Spinner
?

Completion States

Use the status prop to replace the spinner with a completion symbol. The animation stops and a semantic icon is shown with the appropriate theme color.

Completion states
<Spinner status="success" text="Dependencies installed" />
<Spinner status="error" text="Build failed" />
<Spinner status="warning" text="Compiled with warnings" />
<Spinner status="info" text="3 tasks queued" />
StatusSymbolColor
successtheme.success
errortheme.error
warningtheme.warning
infotheme.accent

API Reference

Spinner

PropTypeDefaultDescription
variant"dots" | "pulse" | "meter" | "bloom" | "ellipsis""dots"Animation style
textstring-Text displayed next to the spinner
colorstringtheme.accentForeground color of the spinner frame
status"spinning" | "success" | "error" | "warning" | "info""spinning"Completion state — replaces the spinner with a status symbol

SpinnerPicker

Interactive variant picker with keyboard navigation. Cycles through variants with ←→ keys.

PropTypeDefaultDescription
useKeyboard(handler: (event: any) => void) => void-Keyboard hook from @opentui/react

SpinnerShowcase

Renders all 5 variants side by side with sample text. Takes no props.