How shadcn registries work: install makeui components with one command
November 14, 2026 · 6 min read
When you install a package from npm, the code lands in node_modules and you treat it as a black box. A shadcn-style registry works the other way around: the code is copied into your own source folder, where you can read it, change it and commit it. That is how makeui components are distributed, and understanding the process takes the mystery out of it.
What a registry is
A registry is just a set of JSON files served over HTTP. Each file describes one item: its name, the source code of each file, the npm packages it needs, and any other registry items it depends on. There is no special server. Any static host can serve a registry, which is why makeui can publish one from the same site you are reading.
The command
To add a component, point the shadcn CLI at the item's JSON file:
npx shadcn@latest add https://makeui.xyz/r/spring-switch.jsonThe same works with pnpm dlx, yarn dlx or bunx. Each component page on makeui shows the exact command for your package manager.
What the CLI does
- It downloads the JSON and reads the list of files.
- It reads your components.json to learn where components, utilities and hooks live in your project, using your path aliases.
- It writes the files to those folders, rewriting import paths if your aliases differ.
- It installs any npm dependencies listed in the item, such as motion, using your package manager.
- It follows registryDependencies and installs those items too, for example the cn helper.
If you have not used shadcn before, run npx shadcn@latest init first. It creates components.json and the small utility file that components import from.
What you get
After the command finishes you have a normal file in your project, for example components/ui/spring-switch.tsx. Import it like any component you wrote yourself. There is no runtime dependency on makeui, no version to bump and nothing that breaks if our site goes down.
import { SpringSwitch } from "@/components/ui/spring-switch"
export default function Page() {
return <SpringSwitch />
}Customising
Because the file is yours, customising means editing it. Change the spring numbers, swap colours, rename props or delete features you do not need. This is the main advantage over a package, where you are limited to the props the author exposed.
Updating
The trade-off is that you do not get updates automatically. If a component is improved upstream, you choose when to take it. Run the add command again with the --overwrite flag to replace your copy, or compare the new source with yours and merge the parts you want. Keep customised components in version control so you can see exactly what changed.
Installing by hand
You never need the CLI. Every makeui component page shows the full source, and each one is a single file. Copy it into your project, install the npm packages it lists, make sure the cn helper exists, and you are done. The CLI is a convenience, not a requirement.
Is this safe?
Treat registry code like any code you paste into your project: read it before you commit it. Components from a registry run with the same permissions as the rest of your app. Check what the dependencies are, prefer registries from authors you trust, and review the diff after installing.