shadcn-impl-theming-custom
Installation
SKILL.md
shadcn ui : Theming Custom (Workflow Recipe)
End-to-end recipe for building, pasting, and wiring a custom theme. This skill is the workflow ; the token mental model (oklch versus HSL, v3 versus v4 wiring, full token catalog, decision trees) lives in shadcn-core-theming. ALWAYS read that skill first when in doubt about a token format or wiring location.
Quick Reference : The three-step happy path
The shortest path from "we want a custom theme" to a working dark-mode-toggling app :
- Pick : open https://ui.shadcn.com/themes, pick a base style (
default,new-york,sera,luma), pick a radius (0.0rem,0.25rem,0.5rem,0.75rem,1.0rem), pick a primary color (Zinc, Slate, Stone, Gray, Neutral, Red, Rose, Orange, Green, Blue, Yellow, Violet). - Copy : click "Copy code". The builder emits a single CSS block containing
:root { ... }and.dark { ... }blocks, formatted for the project's Tailwind generation (oklch for v4, HSL space-separated for v3). - Paste : open
app/globals.css(Next.js) orsrc/index.css(Vite). Replace the existing:root { ... }and.dark { ... }blocks ONLY. Keep the@import "tailwindcss";line, the@custom-variant darkline, the@theme inline { ... }block, and the@layer base { ... }block intact.
That is the ENTIRE happy path. If the project already has the ThemeProvider mounted, the new colors take effect on the next dev-server reload. If not, follow the framework-specific mount recipe below.