tailwind-v4-shadcn

Installation
Summary

Tailwind v4 with shadcn/ui using CSS variables and @theme inline pattern.

  • Four-step architecture: define CSS variables at root, map to Tailwind utilities with @theme inline, apply base styles, automatic dark mode switching
  • Prevents 8 documented errors including color mapping failures, dark mode conflicts, @apply breaking changes, and v3 migration gotchas
  • Requires @tailwindcss/vite plugin (not PostCSS), empty Tailwind config in components.json, and ThemeProvider wrapper for theme toggling
  • Supports OKLCH color space (v4 default), built-in container queries and line clamp, and multi-theme setups with proper CSS layer ordering
SKILL.md

Tailwind v4 + shadcn/ui Production Stack

Production-tested: WordPress Auditor (https://wordpress-auditor.webfonts.workers.dev) Last Updated: 2026-01-20 Versions: tailwindcss@4.1.18, @tailwindcss/vite@4.1.18 Status: Production Ready ✅


Quick Start (Follow This Exact Order)

# 1. Install dependencies
pnpm add tailwindcss @tailwindcss/vite
pnpm add -D @types/node tw-animate-css
pnpm dlx shadcn@latest init

# 2. Delete v3 config if exists
rm tailwind.config.ts  # v4 doesn't use this file
Related skills
Installs
2.7K
GitHub Stars
776
First Seen
Jan 20, 2026