Living UI Component Library
Every reusable component rendered directly in pure Rust. Each specimen follows the unified Storybook-grade specification template.
Group 01: Buttons & Links
Direct action triggers with pure CSS states and sub-microsecond event dispatch
Live Preview
Idiomatic Rust API
btn_kv("save", "Save Changes", BtnKind::Primary, &[("draft", "val")]) .variant(Variant::Solid) .tone(Intent::Accent) .size(Size::Md)
Live Preview
Idiomatic Rust API
link("/performance", "Open Performance") .variant(Variant::Solid)
Group 02: Form Inputs & Controls
High-performance form controls bound to HTML5 native validation and AppError envelopes
Live Preview
Idiomatic Rust API
field("Account Identifier", "account_id", value, "Enter ID...")
Live Preview
Idiomatic Rust API
switch("toggle_telemetry", "telemetry", "Enable telemetry", true)
Group 03: FormBuilder & Validation
Declarative form compositors bound to closed acts with zero client-side JavaScript
Live Preview
Idiomatic Rust API
FormBuilder::new(HomeAct::Ping.as_str())
.required_text("draft", "Note")
.placeholder("Enter text...")
.submit("Send Act")
.build(fields)Group 04: Headings, Prose & Badges
Semantic typographic system featuring proportional scale, optical line-heights, and tone intent
Live Preview
Idiomatic Rust API
text("High performance engine").tone(Intent::Accent)Live Preview
Idiomatic Rust API
badge("Implemented").tone(Intent::Ok).variant(Variant::Soft)Group 05: Containers, Stacks & Bento
Zero-JS layout primitives: flex stacks, clusters, and responsive bento grids
Live Preview
Span 2 Tile
Span 1 Tile
Span 1 Tile
Idiomatic Rust API
bento([
panel_icon("layers", "Title", "Sub", body).span(2),
panel_icon("cpu", "Title", "Sub", body).span(1),
])Group 06: Cards & Surfaces
Structured containers with elevation tokens, borders, and depth shadows
Live Preview
Idiomatic Rust API
surface(body).with_surface(Surface::Elevated)
Live Preview
Kernel Cell
Idiomatic Rust API
panel_icon("cpu", "Title", "Sub", body).tone(Intent::Accent)
Group 08: Popovers & Dialogs
Native CSS Anchor Positioning and HTML5 dialogs with zero client JavaScript
Live Preview
Idiomatic Rust API
btn_kv("open_popover", "Settings", BtnKind::Ghost, &[("target", "settings-id")])
Group 09: Notices & Toasts
Semantic inline alerts, banners, and auto-dismissing toast notifications
Live Preview
Idiomatic Rust API
notice_bar(text("Operation completed successfully")).tone(Intent::Ok)Live Preview
Idiomatic Rust API
btn_kv("cue_success", "Save", BtnKind::Primary, &[])
Live Preview
Idiomatic Rust API
toast_act("File saved successfully", "undo", "Undo");
Group 10: Tables & Metric KPIs
High-density data tables and telemetry counters with zero hydration delay
Live Preview
Idiomatic Rust API
metric("0.75 µs", "Parser Latency").tone(Intent::Accent)
Live Preview
Idiomatic Rust API
table(&["Name", "Role", "Email"], rows)
Group 11: Pure Rust SVG Charts
Server-rendered SVG sparklines and telemetry bars with zero external dependencies
Live Preview
Idiomatic Rust API
bars(&[("CPU Load", 18.5), ("WASM Mem", 42.0), ("Bus Sync", 94.0)])
Live Preview
Idiomatic Rust API
spark_area(&[12.0, 18.0, 14.0, 22.0, 35.0, 28.0, 42.0])
Group 12: Closed Acts & MCP AI Server
Single-reducer state machines, View memoization, and Model Context Protocol endpoints
Live Preview
velvet_html::closed_act! {
pub enum HomeAct {
Ping => "saas_showcase_ping" {
islands = &["count"],
form = NoteForm
},
}
}Idiomatic Rust API
HomeAct::Ping => { ... state.count += 1; }Live Preview
Idiomatic Rust API
velvet_serve::ServeOpts::from_env().with_kernel(&KERNEL).with_openapi()