aurora-leptos
Colliery's general dark design system for Leptos. Aurora Dark — semantic tokens, a complete set of UI components + data-display widgets, and the stylesheet — the core that control-plane apps are built from (cloacina included). Everything is first-class core; nothing is a gated optional add-on. Only genuinely app-specific surfaces (e.g. cloacina's DAG/graph + node views) are built downstream from these primitives.
Published on crates.io as colliery-io-aurora; the library is imported as
aurora_leptos.
[]
= "0.1" # or { path = "../aurora-leptos" } in-workspace
= { = "0.8", = ["csr"] } # the binary picks the renderer
use ;
use *;
Generic core (always available)
- Layout —
Box·Group·Stack·SimpleGrid·Grid/GridCol·Divider·AppShell. - Typography —
Text(+mono) ·Code·Anchor·List/ListItem. - Inputs —
Button·ActionIcon·TextInput·Textarea·PasswordInput·NumberInput·Select·Switch·SegmentedControl·CopyButton. - Data / overlay —
Table·Tooltip·Modal·Menu/MenuItem·Alert·Loader. - Aurora —
Pill·StatusBadge·Dot·Panel·PageHeader·Chip·Loading·Empty·ErrorState. - tokens — semantic palette (
token::*),status_color,pill_bg, andclassifyover anApiError. Pure, framework-agnostic Rust.
Widgets (widgets, also core)
Generic, higher-level data-display building blocks. Vocabulary is generic dataflow
— a node processes when its inputs are ready:
Meter · Banner · StateCounts · HealthPill · BuildStatusBadge ·
NodeReadiness · InputTable · StaleInputsBanner, plus the Input model and
format_ago/is_stale/freshness_pct helpers. Apps supply their own state
labels, colors, tooltips, and branding as data — the pack ships no app vocab,
palette, or logo. App-specific views (e.g. cloacina's reactors→nodes,
accumulators→inputs, and its DAG/graph + node views) are built downstream from
these. See ../leptos-gallery for a worked example.
Styling: pick one
The stylesheet ships inside the crate; inject it at runtime or materialise it as a
file at build time. write_css / the aurora-css bin are leptos-free
(default-features = false), so the build step never compiles leptos for the host.
- Runtime (simplest):
<AuroraStyles/>once at the app root —include_str!s the CSS into the wasm. Possible first-paint flash. - Linked stylesheet, no flash:
- trunk validates assets before building, so
build.rsis too late — emit the file in apre_buildhook running theaurora-csshelper, then<link data-trunk rel="css" href="style/aurora.css">. (Install it withcargo install colliery-io-aurora --no-default-features --features bin; in a workspace,cargo run -p colliery-io-aurora … --bin aurora-css. See../leptos-gallery/Trunk.toml.) - cargo-leptos builds before bundling styles, so calling
write_css(Path::new("style"))frombuild.rsworks; pointstyle-fileat it.
- trunk validates assets before building, so
See the workspace ../README.md for full snippets.
When to use what: see PATTERNS.md — a usage guide (for people
and AI agents) with a pick-by-intent table and how to choose between similar pieces.
See ../leptos-gallery for a working example rendering every component and widget.
Status
Component coverage is complete — primitives + widgets (see ../INVENTORY.md),
exercised in ../leptos-gallery. The standard for Colliery Leptos UIs.