ui

Spinner

An indicator that can be used to show a loading state. Built with Base UI and Tailwind CSS. Copy-paste ready.

Installation

Usage

Examples

Input Group

A spinner placed in an InputGroupAddon to indicate that the input is performing a real-time lookup or validation.

In Buttons

Replaces the button label with a spinner and "Loading…" text while an async action is in progress, then restores the original label.

In Empty State

Displays a full centered spinner inside an Empty container — used as the initial loading state before content arrives.

Overlay

A semi-transparent overlay covers the content area and centers a spinner while a background operation completes.

Full Page

A full-viewport centered spinner for top-level route or app initialization loading — shown before the page content renders.

Inline Text

The spinner sits inline next to "Loading…" text for compact in-content loading indicators, such as inside a table row or list item.

Card Overlay

A spinner overlay scoped to a single card rather than the full page, blocking interaction only for that card's content area.

Color variants

Demonstrates the available spinner color options — default, muted, primary, destructive, and custom foreground colors.

Page Transition

A backdrop overlay with a centered spinner simulates a client-side route navigation. The overlay fades in on click and clears after the transition completes.

File Upload

An upload card that shows a spinner in place of the icon while the file transfers. The button is disabled during upload and updates its label to reflect the current state.

Table Loading

A data table where the rows are replaced with spinner placeholders while a refresh is in progress. The toolbar button also swaps its icon for a spinner during the fetch.

Auth Form

A sign-in form whose submit button shows a spinner and "Signing in…" label while the request is in flight, then confirms success once it resolves.

Sizes

All available spinner sizes — xs through 2xl — displayed side by side with labels for quick visual reference.