Skip to Content
ComponentsSpinner

Spinner

Display loading states with various animated spinners.

Import

import { Spinner } from "@raydenui/ui";

Usage

Basic

<Spinner />

Types

<Spinner type="thin" /> <Spinner type="bold" /> <Spinner type="duo-tone" /> <Spinner type="buffering-thin" /> <Spinner type="buffering-bold" /> <Spinner type="dot" /> <Spinner type="juggling" />

Sizes

<Spinner size="xs" /> {/* 20px */} <Spinner size="sm" /> {/* 24px */} <Spinner size="md" /> {/* 32px */} <Spinner size="lg" /> {/* 40px */} <Spinner size="xl" /> {/* 48px */} <Spinner size="2xl" /> {/* 56px */} <Spinner size="3xl" /> {/* 64px */}

With Label

Loading...
<Spinner label="Loading..." />

Label Positions

Loading
Loading
Loading
Loading
<Spinner label="Loading" labelPosition="after" /> <Spinner label="Loading" labelPosition="before" /> <Spinner label="Loading" labelPosition="above" /> <Spinner label="Loading" labelPosition="below" />

White Style

For dark backgrounds:

Loading...
<div className="bg-grey-900 p-4 rounded-lg"> <Spinner colorStyle="white" label="Loading..." /> </div>

Props

PropTypeDefaultDescription
type"thin" | "bold" | "duo-tone" | "buffering-thin" | "buffering-bold" | "dot" | "juggling""thin"Animation type
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl""md"Spinner size
colorStyle"brand" | "white""brand"Color scheme
labelstring—Loading text
labelPosition"after" | "before" | "above" | "below""after"Label placement
classNamestring—Additional CSS classes

Spinner Types

TypeDescription
thinThin rotating circle with partial stroke
boldThicker rotating circle
duo-toneTwo-tone rotating circle
buffering-thinThin buffering animation (dash grows/shrinks)
buffering-boldBold buffering animation
dot8 circular dots with varying opacity
juggling3 bouncing dots with staggered animation

Size Reference

SizePixels
xs20px
sm24px
md32px
lg40px
xl48px
2xl56px
3xl64px

Accessibility

  • Uses role="status" for screen readers
  • aria-label set to label text or “Loading”
  • Animations respect reduced motion preferences
Last updated on