Installation
How to install and set up NexusStratum in your Rust project.
Using the CLI (Recommended)
The fastest way to get started. The CLI creates your config, sets up your project, and lets you add components individually.
1. Install the CLI
cargo install stratum-cli
2. Initialize your project
stratum init --framework leptos
This creates stratum.toml, sets up src/components/, and configures your project for NexusStratum.
3. Add components
stratum add button input dialog select
Components are copied into your project source — you own the code. Customize freely.
Using Cargo (Crate Dependency)
If you prefer to consume NexusStratum as a crate dependency with automatic updates:
Cargo.toml
[dependencies]
stratum = { version = "0.1", features = ["leptos", "tailwind", "icons"] }
Available features
| Feature | Crate | Description |
|---|---|---|
| leptos | stratum-leptos | Leptos framework adapter |
| dioxus | stratum-dioxus | Dioxus framework adapter |
| tailwind | stratum-tailwind | Tailwind CSS integration |
| css | stratum-css | CSS-in-Rust system |
| icons | stratum-icons | 45+ Lucide icons |
| motion | stratum-motion | Animation system |
| security | stratum-security | CSP, CSRF, SRI, sanitization |
| full | all above | Everything except dioxus |
Verify Installation
main.rs
use stratum_leptos::*;
fn main() {
leptos::mount_to_body(|| view! {
<ThemeProvider theme=Theme::default()>
<Button>"It works!"</Button>
</ThemeProvider>
});
}