tailwind-v4-shadcn

Configure Tailwind CSS v4 with shadcn/ui, Vite, and React including dark mode theming.

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/eylulsenakumral/auto-company-clean --skill tailwind-v4-shadcn-eylulsenakumral
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tailwind-v4-shadcn
Source: https://github.com/eylulsenakumral/auto-company-clean/tree/main/.claude/skills/tailwind-v4-shadcn
Command: npx skills add https://github.com/eylulsenakumral/auto-company-clean --skill tailwind-v4-shadcn-eylulsenakumral

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tailwindcss, @tailwindcss/vite, clsx, tailwind-merge, lucide-react, and includes references (resource) components.

What problem does it solve? Setting up Tailwind CSS v4 with shadcn/ui breaks easily due to deprecated packages, wrong plugin syntax, misplaced CSS variables, and config file conflicts, causing build failures and broken themes. ## Core Features & Use Cases - Four-Step CSS Architecture: Enforces the mandatory pattern of root-level CSS variables, @theme inline mapping, and unwrapped variable references in @layer base. - Dark Mode Implementation: Provides a ThemeProvider component with localStorage persistence, system theme detection, and a dropdown toggle component. - Gotcha Prevention: Documents 18 known failure modes including tw-animate-css import errors, duplicate @layer base blocks, and double hsl() wrapping. - Use Case: When initializing a new Vite + React project with shadcn/ui, follow the exact install order and copy the provided templates to get a working dark-mode-ready setup without debugging CSS variable issues. ## Quick Start Set up Tailwind v4 with shadcn/ui in my Vite React project using the four-step architecture and add dark mode support.

Frequently Asked Questions about tailwind-v4-shadcn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Tailwind CSS v4 with shadcn/ui in Vite?▼

Install tailwindcss and @tailwindcss/vite, add the tailwindcss() plugin to vite.config.ts, run shadcn init, then set "config": "" in components.json and delete tailwind.config.ts. Define CSS variables in :root and .dark, then map them with @theme inline.

How to add dark mode to shadcn/ui with Tailwind v4?▼

Create a ThemeProvider component that toggles the .dark class on the html element and persists the choice to localStorage. Wrap your app in ThemeProvider, define dark color overrides in a .dark CSS block, and add a dropdown toggle component.

Why is bg-primary not working in Tailwind v4?▼

The bg-primary utility only exists if you map your CSS variable in an @theme inline block with the --color-primary: var(--primary) syntax. Defining --primary in :root alone does not generate the utility class.

Does Tailwind v4 use tailwind.config.ts?▼

No, Tailwind v4 ignores tailwind.config.ts for theme configuration and uses CSS-first configuration instead. Delete the file and set "config": "" in components.json, or builds may fail.

How do I install Tailwind v4 plugins like typography?▼

Use the @plugin directive in your CSS file, for example @plugin "@tailwindcss/typography" after the tailwindcss import. The v3 approach of requiring plugins in a config file or using @import does not work in v4.

Why do my Tailwind v4 colors show as black or white?▼

This happens from double hsl() wrapping, such as writing hsl(var(--background)) when the variable already contains hsl(). Reference variables directly with var(--background) in @layer base styles.