Spinner

A React loading spinner in arc, ring, dots, and pulse styles with a screen reader label, five tones, three sizes, and an overlay that blocks a region.

Loading preview

Examples

Practical examples and common states for the same installable component.

Default

Fast single-arc loading for compact inline states.

examples/spinner-default.tsx
import { Spinner } from "@/components/wensity/spinner";
export function DefaultSpinner() {
return <Spinner variant="default" label="Loading components" showLabel />;
}

Ring

Layered ring with stronger loading presence.

examples/spinner-ring.tsx
import { Spinner } from "@/components/wensity/spinner";
export function RingSpinner() {
return <Spinner variant="ring" tone="success" label="Publishing changes" showLabel />;
}

Dots

Conversational loading for AI and search flows.

examples/spinner-dots.tsx
import { Spinner } from "@/components/wensity/spinner";
export function DotsSpinner() {
return <Spinner variant="dots" tone="warning" label="Preparing response" showLabel />;
}

Pulse

Ambient waiting state without continuous rotation.

examples/spinner-pulse.tsx
import { Spinner } from "@/components/wensity/spinner";
export function PulseSpinner() {
return <Spinner variant="pulse" tone="danger" label="Waiting for webhook" showLabel />;
}

Overlay

Blocking loader for a panel or workspace region.

examples/spinner-overlay.tsx
import { SpinnerOverlay } from "@/components/wensity/spinner";
export function LoadingOverlay() {
return <SpinnerOverlay label="Refreshing billing" />;
}

Overview

Spinner is a React and Tailwind CSS loading spinner, in Next.js or any React app, in four styles: a spinning arc, a ring of fading ticks, three bouncing dots, and a pulsing circle. Each one renders with role status and a Loading label for screen readers, which you can rename or show. Five tones and three sizes cover buttons, cards, and full panels, and SpinnerOverlay dims a region and makes its content inert while work runs. The CSS animations only play when reduced motion is off, so the indicator sits still while the label still reports loading.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add spinner

Usage

Import Spinner from @/components/wensity/spinner and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { Spinner } from "@/components/wensity/spinner";
export function SpinnerDemo() {
return <Spinner label="Loading components" showLabel />;
}

Props

PropTypeDefaultDescription
variant"default" | "ring" | "dots" | "pulse""default"Which loading animation to render.
size"sm" | "md" | "lg""md"Spinner diameter.
tone"neutral" | "brand" | "success" | "warning" | "danger""neutral"Spinner colour.
labelstring"Loading"Accessible label announced while the spinner is visible.
showLabelbooleanfalseRenders the label as visible text beside the spinner.
  • Liquid Loading Animation component preview

    Liquid Loading Animation

    A loader that fills with liquid to your progress, in a glass circle, square, or word.

  • Water Progress Bar component preview

    Water Progress Bar

    A progress bar that fills with water, its rippling front leaning as it runs.

  • Animated Loading Skeleton component preview

    Animated Loading Skeleton

    An organic loading state instead of a spinner, with a slow aurora that breathes in the space where your content will land.

  • AI Orb component preview

    AI Orb

    A near-black glass sphere with a violet rim that drifts while a model generates.