Show a status
Aurora has four ways to show a status. Each one uses a status hue, so it follows the theme and meets the contrast rules.
The badges on this page are drawn by the Starlight theme of this site, with the same tokens. In your app, use the Rust components below.
A status that Aurora knows
Section titled “A status that Aurora knows”Use StatusBadge. Give it the status text:
use aurora_leptos::components::*;
view! { <StatusBadge status="running" /> }Aurora picks the hue from the text. The case does not matter.
| Text | Hue | Result |
|---|---|---|
running |
ice | running |
completed |
ok | completed |
failed |
bad | failed |
scheduled |
violet | scheduled |
pending, paused |
muted | pending |
cancelled, canceled |
gold | cancelled |
skipped |
skip | skipped |
| any other text | muted | unknown |
status_color(status) gives the same hue token, for your own markup.
A status of your own
Section titled “A status of your own”Use Pill, and give it a hue token:
use aurora_leptos::components::*;use aurora_leptos::tokens::token;
view! { <Pill color=token::OK>"healthy"</Pill> }The result: healthy
The pill puts the -fg token of the hue on its -bg fill. The hues are
ICE, TEAL, VIOLET, GOLD, OK, BAD, SKIP and MUTED.
To explain the status in a tooltip, use HealthPill:
use aurora_leptos::widgets::HealthPill;use aurora_leptos::tokens::token;
view! { <HealthPill label="degraded" color=token::GOLD tip="2 of 5 replicas are down" /> }A build status
Section titled “A build status”Use BuildStatusBadge. It knows success (ok), failed (bad), building
(ice) and pending (muted):
use aurora_leptos::widgets::BuildStatusBadge;
view! { <BuildStatusBadge status="building" /> }Use Dot next to a name, in a list or a table:
use aurora_leptos::components::*;use aurora_leptos::tokens::token;
view! { <Dot color=token::OK /> }size is in px (default 8). glow=true adds a soft ring.