Skip to content
Back

Loading statePro

A pixel-grid loader with a shimmering verb and the elapsed time: drive, dots, orbit or surfer.

oxyn add loading-state
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A 4×4 pixel-grid loader (drive: a lit column sweeping with a trail; dots; orbit: a dot with a tail around the edge; surfer: a rolling wave), a shimmering verb (“Churning”) and the elapsed time with one decimal.

When not to use

  • Fourteen text-glyph loaders (braille, sand, blocks, scanner…) that settle into a check, a warning or a cross when the agent finishes, waits or fails: use Glyph loader instead.
  • A dot and a label for any of the 13 agent states, as a pill, inline or a dot alone: use Status indicator instead.
  • A small turning arc for work that runs right now, plus dots, ray and orbit styles: use Spinner instead.

Installation

Loading state is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add loading-state

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Drive

A lit column driving across.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Orbit

A dot orbiting the edge.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Surfer

A wave rolling through.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Dots

Four dots, no timer.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

LoadingState

PropTypeDefaultDescription
labelrequiredString—Verb ("Churning").
variantString"drive"`drive` · `dots` · `orbit` · `surfer`.
startedrequiredClockMs—Started.
nowrequiredClockMs—Shared clock.
elapsedbooltrueShow the elapsed time.
reducedboolDefault::default()Reduced motion: one still frame, no shimmer.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—Not interactive

Accessibility

  • role=status named by the verb; the grid and timer are aria-hidden.
From the spec
  • role=status named by the verb; grid and timer aria-hidden.

Motion & interaction

Timing
  • Reduced motion: no rise, blur or stagger; labels and values swap instantly (slot reels land at once, the shimmer band stops and the text stays muted).

Responsive behaviour

  • Inline; the timer keeps four characters of width.
Edge cases (spec)
  • Timer keeps 4ch.

Notes for AI

  • Import LoadingState from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: LoadingStateEl in oxyn_gpui.
  • Props to set first: label, started, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI