Skip to content
Ballpoint

Spinner

A pen loop that turns while something loads. Sizes like an icon and takes the text colour.

From shadcn/ui

Installation

pnpm dlx shadcn@latest add @ballpoint/spinner

Usage

tsx
import { Spinner } from "@/components/ui/spinner"

<Spinner />
<Spinner className="size-8" label="Saving" />

Examples

In a button

Disable the button while it works and put a spinner before the label.

In a row

A spinner as the media of an item, for work that is happening elsewhere.

Processing payment…
$100.00
Downloading the sketchbook

API reference

className
string

Size it with size-* and colour it with text-*. It is 16px and the current text colour by default.

label
default "Loading"
string

What screen readers hear. The spinner is a status region.