Install
Set up components.json with the Gelatin UI registry, add the theme, then add your first component with the shadcn CLI.
Get started · step 2 of 3 · 3 min read
Prompt for your agent
Your agent reads /docs/install.md: the same text as this page, as Markdown.
Before you start
The shadcn CLI needs two things in your project:
For Vite, add the tailwindcss and @tailwindcss/vite packages. For the full setup of each framework, see Set up your framework.
Set up the registry in components.json
In a new project, run this command:
It installs our base item, which writes components.json with the Gelatin UI registry and the Phosphor icons. The CLI also writes its own default theme and a src/lib/utils.ts. The next step replaces both.
If your project has a components.json already, add the registry to its registries block instead:
Add the theme
Add the theme and our cn helper once, before the first component:
It writes the light values in :root and the dark values in .dark, and replaces src/lib/utils.ts. Keep both flags: without them, the CLI asks two questions, and with no answer it exits with no change and no error.
Check: src/index.css (or your main stylesheet) now has --primary: oklch(0.17.
No component or block lists the theme as a dependency. So a later add never changes your colors. If you keep your own shadcn theme, skip this step: our components read the same variable names.
Add a component
Put the @gelatin-ui prefix before the name:
The CLI also adds the components and npm packages that the Button needs.
To add more than one in one command, list them all:
Other package managers
Replace npx with the runner of your package manager:
What the add writes
The CLI copies the source into your project, at the paths in components.json. You own that code, and you can change it. The Install section of each component page lists the files that an add writes.
Next steps
- Change the theme: change the colors, the radius, and the fonts.
- Install Pro items: add the Pro registry with your API key.
- Connect the MCP server: let your agent find components and plan an install.