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.

  1. 01

    Add the brain

    Reference the Navius.Primitives package, the headless engine. The styled components copy in as source; they are not a dependency.

    Terminal bash
    dotnet add package Navius.Primitives --prerelease
  2. 02

    Register the services

    In Program.cs, register Navius (the portal registry and toast queue).

    Program.cs csharp
    builder.Services.AddNavius();
  3. 03

    Add the theme

    zits/ui styles with Tailwind v4 utilities keyed off an OKLCH token theme, so utilities like bg-primary are 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 inline bridge that maps them. Point @source at 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.Ui static 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.css and link that one file. More detail in Theming.

  4. 04

    Add a component

    The CLI copies a component's source (and its dependencies) into your project and rewrites the namespace.

    Terminal bash
    dotnet tool install -g navius --prerelease
    navius add button --to ./src/MyApp --namespace MyApp.Ui

    Re-running add skips files that already exist so your edits are safe; pass --overwrite to 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.