kanso/ui

Getting started

CLI & registry

Kanso serves its components in the shadcn registry format, so you can install them with the shadcn CLI.

Add a component

Pass the URL of the item. The CLI installs npm dependencies, any Kanso components it needs, and writes the file.

$ npx shadcn@latest add https://konsa.rohitxyz.me/r/dialog.json

Add several

$ npx shadcn@latest add https://konsa.rohitxyz.me/r/button.json https://konsa.rohitxyz.me/r/card.json

Use a namespace

Register Kanso once in components.json and refer to items as @kanso/name.

components.json
{
  "registries": {
    "@kanso": "https://konsa.rohitxyz.me/r/{name}.json"
  }
}
$ npx shadcn@latest add @kanso/button @kanso/select @kanso/login-block

What's in the registry

/r/registry.json lists every item. Each item file, such as /r/button.json, holds the source, its npm dependencies and the other items it needs. /r/kanso.json is the base style: tokens and keyframes.

The files are generated from src/registry by npm run registry, which also runs before every build.