Registry

PreviousNext

How the shadcn-remix registry is structured and how to consume it with the shadcn CLI.

shadcn-remix is a shadcn registry — a collection of components distributed as source code over HTTP. The shadcn CLI reads a JSON descriptor for each item and copies its files straight into your project.

Installing an item

Point the CLI at any item’s JSON URL:

$ pnpm dlx shadcn@latest add https://www.shadcn-remix.com/r/button.json

The CLI installs the npm dependencies, pulls in the registry dependencies, and writes the files to app/ui/. You own the code from that point on.

Namespaced registry

Add the registry to components.json under registries to install items by name.

components.json
{
  "registries": {
    "@shadcn-remix": "https://www.shadcn-remix.com/r/{name}.json"
  }
}
$ pnpm dlx shadcn@latest add @shadcn-remix/button @shadcn-remix/dialog

Registry structure

/r/registry.json lists every item, and /r/<name>.json serves one item with its file contents. A component item looks like this:

/r/dialog.json
{
  "name": "dialog",
  "type": "registry:ui",
  "dependencies": ["remix"],
  "registryDependencies": [
    "https://www.shadcn-remix.com/r/globals.json",
    "https://www.shadcn-remix.com/r/button.json",
    "https://www.shadcn-remix.com/r/icons.json"
  ],
  "files": [
    {
      "path": "app/ui/dialog.tsx",
      "type": "registry:file",
      "target": "app/ui/dialog.tsx",
      "content": "…"
    }
  ]
}
  • dependencies — npm packages the CLI installs for you. Every component needs remix; components built on its headless primitives also need @remix-run/ui.
  • registryDependencies — other items of this registry, installed automatically. Every component depends on globals.
  • files — each component is one registry:file with an explicit target, so the CLI writes it to app/ui/ without a Tailwind or framework preset.

Support items

ItemFileContents
globalsapp/ui/globals.cssTheme tokens, preflight, and keyframes
iconsapp/ui/icons.tsxLucide icons as Remix components

No build step

The registry is served straight from the component sources in app/ui/, so there is nothing to rebuild after editing a component — the next request returns the new file.