tailwind-v4-shadcn

Guide React teams migrating to Tailwind v4 with shadcn/ui using CSS-variable theming.

18|4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/ataschz/tanstack-start-mastra-example --skill tailwind-v4-shadcn-ataschz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4-shadcn
Source: https://github.com/ataschz/tanstack-start-mastra-example/tree/main/.agents/skills/tailwind-v4-shadcn
Command: npx skills add https://github.com/ataschz/tanstack-start-mastra-example --skill tailwind-v4-shadcn-ataschz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams migrate and configure Tailwind v4 with shadcn/ui in React projects using a CSS-variable theming approach, enabling automatic dark mode and semantic tokens.

Core Features & Use Cases

  • Migration guidance: Replaces tailwind.config.ts with CSS-first theming via @theme inline.
  • Dark mode ready: Implements ThemeProvider and .dark class-based toggling for automatic color switching.
  • End-to-end setup: Covers initialization, Vite integration, and component wiring for shadcn/ui.
  • Real-world use: Streamlines upgrading a large codebase with consistent, theme-aware UI.

Quick Start

Grab a fresh or existing React project and follow the steps to set up v4 with shadcn/ui for semantic colors and automatic theming.

Frequently Asked Questions about tailwind-v4-shadcn

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

FAQPage Schema
How do I migrate React projects to Tailwind v4 with shadcn/ui?

Migrate React projects to Tailwind v4 with shadcn/ui by replacing tailwind.config.ts with a CSS-first theming approach using @theme inline. This setup guides you through a four-step architecture covering root CSS variables, theme mapping, base styles, and dark mode.

What is the CSS-first theming approach for Tailwind v4?

The CSS-first theming approach for Tailwind v4 uses CSS variables and the @theme inline mapping to define semantic tokens. This enables automatic dark mode and consistent theme-aware UI without relying on a traditional JavaScript configuration file.

Why is my Tailwind v4 dark mode not working with shadcn components?

Tailwind v4 dark mode issues with shadcn often stem from missing @theme inline mapping or incorrect base styles. Implementing a ThemeProvider with .dark class-based toggling ensures automatic color switching and resolves missing semantic token mappings.

Do I need to change my Vite server configuration for Tailwind v4?

No server changes are required beyond the standard Vite and React setup. The migration focuses on frontend configuration, specifically replacing the Tailwind config file with CSS-first theming and migrating tw-animate-css for component animations.

Can I use Tailwind v4 with shadcn/ui in a large existing codebase?

Yes, this setup streamlines upgrading large codebases by providing a consistent, theme-aware UI architecture. It specifically handles migration from v3, addressing config changes and component wiring to ensure consistent semantic colors across the project.

Related Skills