tailwind-v4

Configure Tailwind CSS v4 in Vite projects with CSS-first theming.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/alexzhang1030/platform-demo --skill tailwind-v4-alexzhang1030
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4
Source: https://github.com/alexzhang1030/platform-demo/tree/main/.agents/skills/tailwind-v4
Command: npx skills add https://github.com/alexzhang1030/platform-demo --skill tailwind-v4-alexzhang1030

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the confusion and boilerplate involved in adopting Tailwind CSS v4, especially when moving to CSS-first configuration, design tokens, and modern dark mode handling.

Core Features & Use Cases

  • Setup Guidance: Explains the Vite plugin workflow, CSS entry-point setup, and why separate Tailwind config files are no longer needed.
  • Theming and Tokens: Shows how to define colors, spacing, fonts, breakpoints, and animations with @theme and OKLCH values.
  • Dark Mode Strategies: Covers media-query, class-based, and attribute-based approaches for apps that need user-controlled or system-controlled themes.
  • Use Case: A frontend engineer can use this Skill to scaffold a consistent Tailwind v4 foundation for a new product UI and establish scalable token-based styling from day one.

Quick Start

Use the tailwind-v4 skill to configure Tailwind CSS v4 in a Vite project with CSS-first theming, dark mode support, and design tokens.

Frequently Asked Questions about tailwind-v4

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

FAQPage Schema
How do I configure Tailwind CSS v4 with the Vite plugin?

Configure Tailwind CSS v4 by adding the Tailwind Vite plugin and using a single CSS entry point. Separate configuration files are no longer needed, as the setup is handled directly through CSS-first theming.

How do I set up design tokens using @theme in Tailwind v4?

Define design tokens in Tailwind v4 using the @theme directive within your CSS. You can configure colors, spacing, fonts, and breakpoints directly in CSS, utilizing OKLCH values for modern, precise color palettes.

Does Tailwind v4 support class-based dark mode strategies?

Tailwind v4 supports media-query, class-based, and attribute-based dark mode strategies. You can implement user-controlled or system-controlled themes by applying these optional theme-switching patterns within your CSS.

Why do I no longer need a tailwind.config.js file for Tailwind v4?

You do not need a tailwind.config.js file because Tailwind v4 adopts a CSS-first configuration approach. All theming, design tokens, and custom animations are defined directly in your CSS using the @theme directive.

What is the best way to define OKLCH color palettes in a Vite project?

The best way to define OKLCH color palettes in a Vite project is using Tailwind v4's CSS-first theming. Define your OKLCH values as @theme variables in your main CSS entry point for scalable token-based styling.