Back to Skills

tailwind-theme-builder

Set up Tailwind v4 + shadcn/ui themed UI with dark mode. Install deps, configure CSS variables via @theme inline, wire dark mode toggle, verify. Use whenever the user mentions Tailwind v4, setting up Tailwind theming, shadcn/ui colours, dark mode, or troubleshooting colours not working, tw-animate-css errors, @theme inline conflicts, @apply breaking after upgrade, or v3 → v4 migration issues.

801stars80forksUpdated 5/26/2026

Security Assessment

Safe(100/100)
Security Score100/100

About tailwind-theme-builder

The tailwind-theme-builder skill configures a fully themed Tailwind CSS v4 and shadcn/ui project with dark mode support using the required CSS variable architecture for Tailwind v4. It solves common migration and configuration problems that occur when upgrading from Tailwind v3, integrating semantic theme tokens, or troubleshooting issues such as broken `@apply` usage, missing semantic utility classes, `tw-animate-css` errors, and conflicts with `@theme inline`. The skill establishes the mandatory four-step theming pattern required for Tailwind v4, ensuring semantic utility classes like `bg-background` and `text-primary` function correctly while supporting automatic dark mode updates through CSS variables.

The skill installs and configures the required dependencies for Tailwind v4, Vite integration, and shadcn/ui setup. It defines semantic CSS variables for both light and dark themes, maps those variables into Tailwind utilities using `@theme inline`, and applies base styles through the correct `@layer base` structure. It also configures a ThemeProvider-based dark mode implementation that toggles the `.dark` class on the root HTML element, allowing UI updates without component re-rendering. Additional guidance includes semantic token naming, foreground/background pairing, WCAG contrast recommendations, and chart colour handling using dedicated variables.

This skill is useful for developers building React and Vite applications with Tailwind v4 and shadcn/ui, especially teams implementing reusable design systems or migrating older Tailwind projects to the new architecture. It is particularly valuable for frontend engineers troubleshooting theme-related issues, setting up dark mode support, or creating semantic, maintainable colour systems based on CSS variables and utility classes.

FAQ

What problem does this skill solve for Tailwind v4 projects?

It provides the required CSS variable architecture and configuration pattern needed for Tailwind v4 semantic theming with shadcn/ui and dark mode support. It also helps resolve migration and compatibility issues related to theming and utility generation.

Does this skill support dark mode?

Yes. Dark mode is implemented by toggling the `.dark` class on the HTML element through a ThemeProvider, allowing CSS variables to update automatically without requiring `dark:` utility variants for semantic colours.

Which tools and libraries are required?

The setup requires Tailwind CSS v4, `@tailwindcss/vite`, `tw-animate-css`, Vite, and shadcn/ui. The workflow also assumes a React-based project structure.

Can this skill be used for Tailwind v3 projects?

The documentation focuses on Tailwind v4 architecture and includes migration guidance from v3 to v4, including removal of legacy `tailwind.config.ts` configuration files.

Are there any architectural requirements for the CSS setup?

Yes. The four-step CSS architecture is mandatory. CSS variables must be defined at the root level, mapped using `@theme inline`, and applied in the specified order. Skipping or modifying the pattern can break semantic utility generation and theming.

All Files

8 files
assets/theme-provider.tsx2.2 KB
View
assets/tsconfig.app.json0.7 KB
View
assets/index.css4.5 KB
View
references/migration-guide.md6.7 KB
View
assets/utils.ts0.2 KB
View
assets/components.json0.4 KB
View
assets/vite.config.ts0.3 KB
View
SKILL.md12.4 KB
View

Install tailwind-theme-builder

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill