Server Component · 0 KB client JS

Loader

An indeterminate loading indicator in five variants, with a screen-reader label built in.

Loading…

Import#

import { Loader } from "astralis-ui";

Variants#

blocks is the default: the Astralis mark assembling itself. spinner is a rotating arc, dots three dots in sequence, bars an equaliser, and pulse a dot sending out rings.

Loading…

blocks

Loading…

spinner

Loading…

dots

Loading…

bars

Loading…

pulse

Sizes#

Loading…Loading…Loading…Loading…Loading…

Color schemes#

Every variant paints with the accent channel, so any scheme works.

Loading…Loading…Loading…Loading…Loading…

Props#

PropTypeDefaultDescription
variant"blocks" | "spinner" | "dots" | "bars" | "pulse""blocks"Which animation. blocks is the Astralis mark assembling itself.
size"xs" | "sm" | "md" | "lg" | "xl""md"Width and height of the indicator.
colorSchemeall 15 schemes"brand"Hue of the indicator.
labelstring"Loading…"Visually-hidden text announced to screen readers.

Accessibility#

  • Renders role="status" with a visually-hidden label, so assistive tech announces the loading state without any extra wiring.
  • The animation keeps running under prefers-reduced-motion, because it conveys state, not decoration. Pair long operations with Progress when you can report actual completion.