Skip to main content
This guide covers installing components from the Mzizi registry, customising them after installation, and keeping them updated.

Prerequisites

Before installing components, your project needs:
  1. A components.json file — created by npx shadcn@latest init.
  2. The cn() utility in lib/utils.ts.
  3. 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:
  1. Install npm dependencies — packages such as radix-ui, class-variance-authority or recharts.
  2. Install registry dependencies — other registry items the component needs. Installing dialog pulls in button.
You do not resolve dependencies by hand.

What you get

Components install as local files. A typical install creates:
The file contains TypeScript with full type annotations, CVA variant definitions, Radix UI primitives where the component is interactive, 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:
This overwrites the local file. If you have customised it:
  1. Commit your current state.
  2. Run the update.
  3. Read the diff and re-apply your changes.
There is no merge step and there is not meant to be one — the whole point of a file you own is that your version control, not the registry, arbitrates.

Using the API directly

You do not need the CLI. The JSON response carries the complete source in files[].content:

Practices worth keeping

  1. Install from the registry rather than copying code out of documentation — the docs paraphrase, the API does not.
  2. Keep cn(). Components depend on it from @/lib/utils.
  3. Keep the token layer. Components reference CSS custom properties; without them they render with whatever your project’s fallbacks happen to be.
  4. Test after updating. Check appearance and behaviour, not just that the build passes.
  5. Track changes in version control so an update diff is legible.