# Registry

Understand SUI manifests, shared styles, and GitHub distribution.

Page: https://sui.draco.dev/docs/registry

The SUI registry distributes editable component source through the [CLI](/docs/cli) and [MCP](/docs/mcp). Use GitHub addresses as described in [installation](/docs/installation); the existing `@sui` namespace remains supported too.

## GitHub registry

The root `registry.json` declares every item and references normalized source files in `registry/source/`. The CLI reads these files directly from GitHub without manual namespace configuration. Each item retains its complete dependencies, CSS, and theme tokens.

```bash
npx shadcn@latest registry validate draco-china/sui
npx shadcn@latest add draco-china/sui/button
```

With pnpm, Yarn or Bun, use `pnpm dlx`, `yarn dlx` or `bunx --bun` in place of `npx`, and `pnpm add`, `yarn add` or `bun add` in place of `npm install`.

`bun run registry:build` generates both the GitHub registry and existing Raw JSON payloads; `bun run registry:check` checks both against source without writing. Edit authored files in `packages/ui/src/` and regenerate instead of editing `registry/source/` or the root manifest. The root manifest uses compact JSON to stay below the GitHub registry 5 MiB per-file limit.

## GitHub files

```json
{
  "registries": {
    "@sui": "https://raw.githubusercontent.com/draco-china/sui/main/registry/r/{name}.json"
  }
}
```

`registry/r/registry.json` is the searchable catalog. `registry/r/button.json`, for example, contains the installation payload for Button. Names do not have a locale prefix; installed components use English defaults and accept application-owned text.

| Item | Content |
| --- | --- |
| Component name, such as `button` | Component, transitive local files, dependencies, CSS, and theme tokens |
| `delete-resource`, `tanstack-form` | A Block and its required source and styles |
| Layouts, viewers, chat and charts, such as `app-shell`, `markdown-viewer`, `message` or `bar-chart` | The item installed under `components/layouts`, `viewers`, `chat` or `charts`, with its source and styles |
| `sui-style` | Shared theme and component CSS |
| `sui-theme` | Theme helpers and shared styles |
| `sui` | All components, Blocks, layouts, viewers, chat and charts |

## Files and dependencies

Manifests use shadcn's registry schema. `dependencies` and `devDependencies` declare package versions. `files` contains source and targets resolved against application aliases; `css` and `cssVars` merge into the configured stylesheet.

Each item is self-contained, including local hooks, helpers, declarations, and other components it imports. This avoids depending on a consumer's namespace or accidentally resolving a same-named component from another registry. The catalog describes items without duplicating their source; the individual payloads carry full content.

The CLI rewrites imports to your aliases. Workspace imports in documentation are explained in the [import mapping](/docs/installation#import-installed-source). Installed theme values and source are editable; review their differences when adding SUI to an existing design system.

## Update installed source

Preview changes with the [CLI](/docs/cli#review-an-update) before updating components and shared dependencies. Installation copies source; files do not automatically follow library changes. Keep your application's package-manager lockfile and review styles alongside local edits.

A component made of several files installs into its own folder and exports from the `index.tsx` there, as CodeEditor, Image and DataTable do. CodeEditor, Image and DataTable installed from SUI 5.4 or earlier came with a `components/ui/<name>.tsx` beside the folder. Delete it after updating: it wins over the folder's index, so imports would keep the old version.

LLM documentation lives on the documentation site's [text endpoints](/docs/llms-txt). Registry JSON supplies installation data; an MCP client starts the shadcn stdio server separately.

Ordinary items and `sui-style` include default light/dark tokens only. Optional `theme-<name>` style items contain one preset and are never pulled in automatically. Install the desired palette explicitly after the base styles.
