Registry
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:
$ bunx --bun shadcn@latest add https://www.shadcn-remix.com/r/button.json$ npx shadcn@latest add https://www.shadcn-remix.com/r/button.json$ pnpm dlx shadcn@latest add https://www.shadcn-remix.com/r/button.json$ yarn dlx shadcn@latest add https://www.shadcn-remix.com/r/button.jsonThe 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.
{
"registries": {
"@shadcn-remix": "https://www.shadcn-remix.com/r/{name}.json"
}
}$ bunx --bun shadcn@latest add @shadcn-remix/button @shadcn-remix/dialog$ npx shadcn@latest add @shadcn-remix/button @shadcn-remix/dialog$ pnpm dlx shadcn@latest add @shadcn-remix/button @shadcn-remix/dialog$ yarn dlx shadcn@latest add @shadcn-remix/button @shadcn-remix/dialogRegistry structure
/r/registry.json lists every item, and /r/<name>.json serves one item with its file contents. A component item looks like this:
{
"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 needsremix; components built on its headless primitives also need@remix-run/ui.registryDependencies— other items of this registry, installed automatically. Every component depends onglobals.files— each component is oneregistry:filewith an explicittarget, so the CLI writes it toapp/ui/without a Tailwind or framework preset.
Support items
| Item | File | Contents |
|---|---|---|
globals | app/ui/globals.css | Theme tokens, preflight, and keyframes |
icons | app/ui/icons.tsx | Lucide 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.
Want to publish your own registry? Follow the official registry guide.