tailwind-v4-shadcn

Set up Tailwind v4 with shadcn/ui in Vite React projects.

52|6|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/ovachiever/droid-tings --skill tailwind-v4-shadcn-ovachiever
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4-shadcn
Source: https://github.com/ovachiever/droid-tings/tree/main/skills/tailwind-v4-shadcn
Command: npx skills add https://github.com/ovachiever/droid-tings --skill tailwind-v4-shadcn-ovachiever

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a production-ready pattern for Tailwind v4 + shadcn/ui theming using CSS variables, dark mode, and semantic tokens, reducing configuration errors and ensuring consistent visuals.

Core Features & Use Cases

  • Four-step theming architecture (root CSS vars, @theme inline mapping, base styles, dark mode)
  • Dark mode with automatic theme switching
  • Semantic color tokens and robust design templates
  • Zero-config setup via empty components.json and template files

Quick Start

Copy templates and follow the SKILL.md steps to initialize a Vite + React project with Tailwind v4 + shadcn/ui, enabling dark mode and semantic tokens.

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 v4 with shadcn/ui and CSS variable theming?

Tailwind v4 with shadcn/ui uses a four-step architecture: define CSS variables at root, map them to Tailwind utilities with @theme inline, apply base styles with @layer, and enable automatic dark mode. Follow the SKILL.md templates to initialize a Vite + React project with production-ready configuration and semantic color tokens.

Can I migrate from Tailwind v3 to v4 while keeping shadcn/ui components?

Yes. Migrating to Tailwind v4 requires updating your config to use an empty tailwind.config.ts, moving CSS variables to root scope, and applying @theme mapping inline in your CSS. The Skill provides debugged templates and step-by-step guidance to ensure dark mode, color theming, and component styling work correctly after migration.

What's the best way to implement dark mode with Tailwind v4 and CSS variables?

Dark mode in Tailwind v4 is enabled automatically when CSS variables are wrapped in hsl() and @theme mapping is applied. Define your semantic color tokens as CSS variables at root, use @layer to apply base styles, and the Skill's architecture ensures automatic switching without additional configuration.

How do I debug color and theme issues in Tailwind v4 with shadcn/ui?

Common issues stem from missing hsl() wrappers around CSS variables, incorrect @theme syntax, or misconfigured path aliases. The Skill includes production-tested templates and troubleshooting patterns for resolving dark mode failures, CSS variable mapping errors, and tw-animate-css conflicts in Vite + React setups.

Do I need to configure Tailwind's config file when using CSS variable theming?

No. Tailwind v4 with CSS variables uses an empty tailwind.config.ts; all configuration moves to your CSS file via @theme inline mapping. This zero-config approach reduces errors and makes your theme portable across projects while maintaining full semantic token support and dark mode functionality.

Can I use semantic color tokens with Tailwind v4 and shadcn/ui templates?

Yes. Semantic tokens are defined as CSS variables at root scope, then mapped to Tailwind utilities using @theme inline. The Skill's architecture ensures tokens like primary, secondary, and destructive integrate seamlessly with shadcn/ui components and automatic dark mode switching.