Capítulo 3 de 108
components.json configures how the CLI generates components for your specific project (style, Tailwind setup, import aliases, registries). Only needed if using the CLI; the copy-paste method doesn't require it.
"new-york" (the default style is deprecated). Cannot be changed after init.tailwind.config.js/ts; leave blank for Tailwind v4.neutral | stone | zinc | mauve | olive | mist | taupe; sets default theme tokens; immutable after init.true generates semantic tokens (background, primary, ...); false generates inline Tailwind color utilities. Immutable after init (switching requires delete + reinstall).true auto-adds "use client" to client components (React Server Components support).false installs components as .jsx instead of .tsx.utils, components, ui, lib, hooks import roots, backed by tsconfig/jsconfig paths or package.json#imports.@name) registry URL templates, optionally with headers/params for auth, used via npx shadcn add @name/item.{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"tailwind": {
"css": "styles/global.css",
"baseColor": "neutral",
"cssVariables": true
},
"rsc": true,
"tsx": true,
"aliases": {
"components": "@/components",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks",
"utils": "@/lib/utils"
},
"registries": {
"@private": {
"url": "https://api.company.com/registry/{name}.json",
"headers": { "Authorization": "Bearer ${REGISTRY_TOKEN}" }
}
}
}
${VAR_NAME} (expandida automaticamente).style, tailwind.baseColor, or tailwind.cssVariables post-init: these are locked in; switching cssVariables requires deleting and reinstalling components.tailwind.config under Tailwind v4: leave it blank, it's a v3-era field.components.json is the CLI's map of your project conventions, not runtime config shipped to the app.style, baseColor, cssVariables.registries + namespaced add @name/item is how private/team component sources are wired in.registries.*.headers/params use ${VAR_NAME} syntax and expand from the shell environment.init/add read and write this file.cssVariables and baseColor determine the generated theme tokens.