Appica UIUI 1.0.0

Spinner

A spinning indicator that shows a loading state.

Usage

Spinner is a small, self-contained loading indicator that animates forever — use it whenever something is happening and you can't show progress. It comes in three shapes via variant: circular (the default sweep), dots (a ring of fading ticks), and sparkle (a morphing four-point star).

Two things make it drop into anything: it's sized by font-size, so set a text-* class (or inherit 1em from a parent) to scale it, and currentColor makes it take the surrounding text color instead of the primary accent — which is exactly what you want inside a colored button. It renders a role="status" element with an aria-label of "Loading".

Reach for Spinner for compact, in-place waits — a button, an icon button, a small overlay. For a wider "this section is loading" indicator that reads more like progress, use Loader.

Examples

Variants

Three shapes for different personalities: circular, dots, and sparkle. All animate indefinitely and honour prefers-reduced-motion (they hold a static frame instead of spinning).

Sizing

The spinner is sized by font-size, so a text-* utility scales the whole thing — no size prop. Drop one next to text with no class and it inherits 1em, matching the line.

Color

By default the spinner uses the primary accent. Add currentColor and it inherits the surrounding text color instead — ideal on colored surfaces or to match a status color.

In a button

The most common use: a submit button that shows a spinner while the action runs. Set currentColor so it matches the button's text, size it with text-[1.2em] so it scales with the button, and disable the button while loading. The second button pairs the sparkle variant with a Gradient Glow for an "Ask AI" affordance that lights up while it thinks.

Refresh button

In an icon button, swap the icon for a spinner while the action is in flight — the button keeps its size, so the layout never jumps.

Loading a panel

Drive a region's loading state from your own state: show a centred spinner while fetching, then swap in the content. Here a status card reloads on demand.

RTL

Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior follows the same direction.

The spinner itself is direction-agnostic; inside a button it simply leads the label, which sits on the correct side under RTL. For setup details and caveats, see the RTL guide.

API reference

Spinner renders a single <span role="status"> and forwards ref, className, and any other span attributes.

Accessibility

  • The spinner is a role="status" live region with a default aria-label="Loading"; give it a more specific label (e.g. "Saving") when the context warrants it.
  • Inside a button, the button's own text ("Saving…") is the accessible name — the spinner just reinforces it visually.
  • A purely decorative spinner that sits beside text already conveying the state can be hidden from assistive tech with aria-hidden.
  • The animation is replaced by a static frame when the user prefers reduced motion.

© 2026 Appica UI. A free component library, crafted by the Appica team.