components.json
components.json is the project configuration file for the ParticleUI CLI. It lives at your project root and tells the CLI how to install components — which registries to use, where to place files, and how to resolve aliases.
Note
npx particleui-cli init to generate this file automatically. If you already have one from a previous setup, just add the registries key.Overview
A freshly initialised project produces a file like this:
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}Registry configuration
Add a registries key at the top level. Each key is a namespace prefix you'll use in the CLI command. The url field uses {name} as a placeholder — the CLI fills it in automatically.
{
"registries": {
"@particleui": {
"url": "https://particleui.dev/r/react/{name}.json",
"headers": {
"Authorization": "Bearer ${PARTICLEUI_TOKEN}"
}
}
}
}urlThe registry endpoint. {name} is replaced by the component name.
headers.AuthorizationOptional for free components. Required for Pro — set PARTICLEUI_TOKEN in your .env.
Full example
A complete components.json with ParticleUI configured:
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/app/globals.css",
"baseColor": "neutral",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
},
"registries": {
"@particleui": {
"url": "https://particleui.dev/r/react/{name}.json",
"headers": {
"Authorization": "Bearer ${PARTICLEUI_TOKEN}"
}
}
}
}The Authorization header is silently ignored for free components, so you can keep the entry consistent across all projects.
Framework URLs
Change the url to target a different framework:
https://particleui.dev/r/react/{name}.jsonhttps://particleui.dev/r/vue/{name}.jsonhttps://particleui.dev/r/svelte/{name}.json