Skip to content

Spinner

A turning ring for pending work, in three sizes; it stays still under reduced motion.

0.7 kB gzipSource Registry JSON

Spinner playground

Loading

Props

size

Installation

npx shadcn@latest add https://sproutboat.com/ikada/r/spinner.json

The CLI writes components/ikada/spinner.tsx and merges the ikada theme into your CSS. Or take it from the package: import { Spinner } from "@sproutboat/ikada";

Usage

import { Spinner } from "@/components/ikada/spinner";

<Spinner size="lg" />

Examples

Sizes

LoadingLoadingLoading

Labelled

The label is announced politely. Say what is loading.
Deploying robin

Decorative

When the parent already says it, hide the spinner from assistive tech.
Deploying

In a button

Button's own loading prop already draws one; this is for custom layouts.

Props

SpinnerProps
PropTypeDescription
labelstringWhat is loading. Announced politely; pass `decorative` when the parent already says it. Default `Loading`.
decorativebooleanHide from assistive tech (the button or region it sits in is already `aria-busy`). Default `false`.
size"sm" | "md" | "lg" | null—

Also takes every prop of Omit<ComponentProps<"span">, "children">, VariantProps<typeof spinnerStyles>.

Source: src/components/spinner.tsx