Capítulo 101 de 108
Short answers to recurring registry-authoring questions: complex component anatomy, adding Tailwind colors/theme vars, and how registryDependencies resolves bare names vs. GitHub addresses.
registry:block combining a registry:page (with target), multiple registry:component/registry:hook/registry:lib files, and a registry:file config with target: "~/hello.config.ts".cssVars.light and cssVars.dark (e.g. brand-background, brand-accent); the CLI updates the project's CSS file and the color becomes usable as bg-brand/text-brand-accent.cssVars.theme (e.g. text-base, ease-in-out, font-heading).registryDependencies names: "button" always means the built-in shadcn button, never same-repo GitHub items — use the full GitHub address (acme/ui/button) for that.#ref (branch, tag, or full commit SHA) — npx shadcn@latest add acme/ui/button#v1.2.0. Prefer tags/SHAs for published registries.github.com repos; use an authenticated namespace URL instead.{
"cssVars": {
"light": { "brand-background": "oklch(0.205 0.015 18)", "brand-accent": "oklch(0.205 0.015 18)" },
"dark": { "brand-background": "oklch(0.205 0.015 18)", "brand-accent": "oklch(0.205 0.015 18)" }
}
}
cssVars.light/dark de um registry item.button in registryDependencies to mean "the button in my GitHub repo": it always resolves to the built-in shadcn item; use acme/ui/button for repo-local items.cssVars.light/dark; new/overridden theme scale values (spacing, fonts, easing) go in cssVars.theme.#ref syntax; commit SHA is safest for reproducibility.cssVars and registryDependencies field spec.