New advertisers: 50% off your first month with code FIRSTMONTHSee slots
jezweb avatar

Tailwind Theme Builder

Tailwind v4 theming setup for shadcn/ui with CSS variables, dark mode, and troubleshooting for common migration errors.

skills.sh installs
3.3K
GitHub stars
1.1K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the full setup flow: dependency install, Vite plugin config, a four-step CSS variable architecture, dark mode wiring, and components.json configuration
  • Includes a ThemeProvider, a ModeToggle component built on shadcn dropdown menu, and an 18-entry gotcha table with symptom, cause, and fix
  • Enforces rules such as wrapping colours in hsl() inside :root and .dark, using @theme inline, and avoiding :root inside @layer base
  • Designed for projects migrating from Tailwind v3 or troubleshooting colours, tw-animate-css errors, or @apply breakage after upgrade

Install

$ npx -y skills add jezweb/claude-skills --skill tailwind-theme-builder -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Tailwind Theme Builder

Set up a fully themed Tailwind v4 + shadcn/ui project with dark mode. Produces configured CSS, theme provider, and working component library.

Architecture: The Four-Step Pattern

Tailwind v4 requires a specific architecture for CSS variable-based theming. This pattern is mandatory -- skipping or modifying steps breaks the theme.

How It Works

CSS Variable Definition --> @theme inline Mapping --> Tailwind Utility Class
--background           --> --color-background     --> bg-background
(with hsl() wrapper)      (references variable)     (generated class)

Dark mode switching:

ThemeProvider toggles .dark class on <html>
  --> CSS variables update automatically (.dark overrides :root)
  --> Tailwind utilities reference updated variables
  --> UI updates without re-render

Best Practices

Details

Repository
github.com/jezweb/claude-skills
Categories
Frontend & UI Code, Design & UI/UX

More from jezweb/claude-skills

All 64

Similar to Tailwind Theme Builder

More Frontend & UI Code