Introduction
NexusStratum is a complete UI component system for the Rust frontend ecosystem.
What is NexusStratum?
NexusStratum is a three-layer component architecture — headless primitives, styled components, and framework adapters — for building accessible, production-quality interfaces in Leptos and Dioxus. It draws inspiration from projects like shadcn/ui and Radix UI in the React ecosystem, adapted for Rust's type system and ownership model.
While other projects in the Rust UI space exist (RustForWeb/shadcn-ui, leptos-shadcn-ui, Leptonic), NexusStratum takes a different approach: framework-agnostic headless primitives at the core, with security hardening and a complete design token system built into every layer.
Architecture
The library is built as a three-layer stack:
- Headless Primitives (
stratum-primitives) — Unstyled, fully accessible, ARIA-compliant component logic. Works with any Rust frontend framework. - Styled Components (
stratum-components) — Production-quality default styles built on Tailwind CSS. Beautiful out of the box, fully customizable. - Framework Adapters (
stratum-leptos,stratum-dioxus) — Idiomatic APIs for each framework. Leptos signals or Dioxus hooks — your choice.
On top of this: a design token system (stratum-theme), CSS-in-Rust (stratum-css), Tailwind integration (stratum-tailwind), 45+ icons (stratum-icons), and a security hardening layer (stratum-security).
Key Features
- 50+ components — Buttons, inputs, dialogs, tabs, accordions, cards, badges, toasts, and more.
- 23 headless primitives — Full ARIA compliance, keyboard navigation, focus management.
- 7 built-in themes — Light/dark mode, custom themes, scoped themes.
- Zero unsafe code — Pure safe Rust throughout.
- WCAG 2.2 AA — Every interactive component meets accessibility standards.
- Security built in — XSS prevention, CSP, CSRF, SRI at the framework level.
Quick Start
[dependencies]
stratum = { version = "0.1", features = ["leptos", "tailwind", "icons"] }
use stratum_leptos::*;
#[component]
fn App() -> impl IntoView {
view! {
<ThemeProvider theme=Theme::default()>
<Button variant=ButtonVariant::Primary>
"Save changes"
</Button>
</ThemeProvider>
}
}