Rust first, where it exists
Mzizi’s components are being rebuilt in Rust as Mzizi Roots, and where a Rust implementation exists it is the one to prefer. A Dioxus project depends on the crates, which are on crates.io:mzizi-ui or mzizi-brand. See
Mzizi Roots for the features and the full list. The
mzizi add installer in
@nyuchi/mzizi-cli resolves a component by name: for a Rust project it names the crate and
prints the cargo add to run, rather than copying .rs files.
You can read any Rust component’s source too:
crate field names the crate the
component ships in, which differs by node: mzizi-ui for button, mzizi-brand for
mzizi-alert-banner. The rest of this page covers the React build.
The Astro build
The registry is the single source of every component in every format:.tsx, .rs, .astro
(and .mz as it lands). Where a component has an Astro implementation, it is a pure .astro
file beside its .tsx and .rs, with no React, Svelte or Vue under it and no client
JavaScript unless its contract allows one enhancement script. The Dashboard Standard
(app-* and the primitives), the Discover Standard and its
detail pattern (discover-*) and the marketing-site components
(site-*) all have one.
--target astro in an Astro project, even one with React islands. It
reads https://api.mzizi.dev/v1/astro/<name> and writes the component, every registry file it
imports and any brand asset into src/components/mzizi/, then prints the npm dependencies to
add. A component in the closure with no .astro is refused by name, never replaced by its
.tsx. GET /v1/astro lists every name it serves.
@bundu/ui ships the same .astro files as a package (@bundu/ui/app/*,
@bundu/ui/discover/*): it is built from the registry at a pinned commit, and its CI fails if
it drifts.
The React build
The React and TypeScript components are the React build. They keep working and install with the shadcn CLI, but they are deprioritised: not the lead, and not where new work goes.Prerequisites
Before installing components, your project needs:- A
components.jsonfile — created bynpx shadcn@latest init. - The
cn()utility inlib/utils.ts. - Tailwind CSS with the Mzizi design tokens in your global stylesheet. See design tokens.
Installing
A single component
Several at once
Hooks and libraries
Hooks and library utilities install the same way — the item type in the manifest decides where the file lands.Dependency resolution
Installing a component makes the CLI do two things automatically:- Install npm dependencies — packages such as
radix-ui,class-variance-authorityorrecharts. - Install registry dependencies — other registry items the component needs. Installing
dialogpulls inbutton.
What you get
Components install as local files. A typical install creates:cn() class composition, and data-slot
attributes for stable styling hooks.
Customising after install
Because the file is yours, you edit it directly.Adding a variant
Extending props
Updating
To take the latest registry version of a component, run the same add command again:- Commit your current state.
- Run the update.
- Read the diff and re-apply your changes.
Using the API directly
You do not need the CLI, and you do not need to sign in. The JSON response carries the complete source infiles[].content:
Practices worth keeping
- Install from the registry rather than copying code out of documentation — the docs paraphrase, the API does not.
- Keep
cn(). Components depend on it from@/lib/utils. - Keep the token layer. Components reference CSS custom properties; without them they render with whatever your project’s fallbacks happen to be.
- Test after updating. Check appearance and behaviour, not just that the build passes.
- Track changes in version control so an update diff is legible.