Getting Started

components.json

zits/ui's distribution config. The navius CLI reads a plain-JSON registry (a simple registry-item schema) to resolve which files to copy and how to rewrite their namespace.

The registry

registry.json lists every available item. The CLI resolves an item's registryDependencies transitively, copies the files into your project, and rewrites the namespace to yours.

registry.json json
{
  "name": "zits/ui",
  "homepage": "https://zits-ui.dev",
  "items": [
    { "name": "button", "type": "registry:ui", "files": ["Components/ZitsButton.razor"] },
    { "name": "dialog", "type": "registry:ui", "registryDependencies": ["core", "cn"], "files": ["…"] }
  ]
}

A registry item

Each item declares its files and its dependencies: both other registry items (core, cn) and brain primitives.

registry-item json
{
  "name": "dialog",
  "type": "registry:ui",
  "registryDependencies": ["core", "cn"],
  "files": [
    "Components/ZitsDialog.razor",
    "Components/ZitsDialogContent.razor",
    "Components/ZitsDialogTrigger.razor"
  ]
}

Host your own

Because the registry is just JSON, anyone can host their own component registry and point the CLI at it: fork the schema, publish your items, and navius add from it.