Getting Started
Installation
Add the headless brain, register services, set up the theme, then copy components in with the CLI. Works in any Blazor host: WebAssembly, Server, Blazor Web App, and MAUI Blazor.
- 01
Add the brain
Reference the
Navius.Primitivespackage, the headless engine. The styled components copy in as source; they are not a dependency.Terminal bashdotnet add package Navius.Primitives --prerelease - 02
Register the services
In
Program.cs, register Navius (the portal registry and toast queue).Program.cs csharpbuilder.Services.AddNavius(); - 03
Add the theme
zits/ui styles with Tailwind v4 utilities keyed off an OKLCH token theme, so utilities like
bg-primaryare not free: you run a Tailwind v4 build (standalone CLI, no Node) that scans your markup for classes and imports the token stylesheet, which carries the tokens plus the@theme inlinebridge that maps them. Point@sourceat both your own markup and the component dirs the CLI vendored.Styles/app.css (vendored) css@import "tailwindcss"; /* Scan your own markup and the component dirs the CLI copied in. */ @source "./Components/**/*.razor"; @source "./Zits/**/*.razor"; @source "./Navius/**/*.razor"; /* Tokens + the @theme inline bridge (navius add theme copies this into wwwroot). */ @import "./wwwroot/zits-ui.css";Referencing the packages instead of vendoring? Import the token stylesheet from the
Zits.Uistatic web assets and scan just your own markup:Styles/app.css (package) css@import "tailwindcss"; /* Scan your own markup; the Zits.Ui package ships its styled components. */ @source "./Components/**/*.razor"; /* Tokens + the @theme inline bridge from the package's static web assets. */ @import "_content/Zits.Ui/zits-ui.css";Compile it to
wwwroot/app.cssand link that one file. More detail in Theming. - 04
Add a component
The CLI copies a component's source (and its dependencies) into your project and rewrites the namespace.
Terminal bashdotnet tool install -g navius --prerelease navius add button --to ./src/MyApp --namespace MyApp.UiRe-running
addskips files that already exist so your edits are safe; pass--overwriteto replace them. To own the styled layer but keep the brain as a package, add--styled-only. See the CLI reference.
That's it: <ZitsButton /> is now yours. Browse the components.