Loading statePro
A pixel-grid loader with a shimmering verb and the elapsed time: drive, dots, orbit or surfer.
oxyn add loading-stateThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add loading-stateUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Drive
A lit column driving across.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Orbit
A dot orbiting the edge.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Surfer
A wave rolling through.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Dots
Four dots, no timer.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
LoadingState
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | String | — | Verb ("Churning"). |
variant | String | "drive" | `drive` · `dots` · `orbit` · `surfer`. |
startedrequired | ClockMs | — | Started. |
nowrequired | ClockMs | — | Shared clock. |
elapsed | bool | true | Show the elapsed time. |
reduced | bool | Default::default() | Reduced motion: one still frame, no shimmer. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| — | 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
LoadingStatefromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
LoadingStateElinoxyn_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.