tailwind-v4

Configure Tailwind CSS v4 with Vite and the @theme directive.

5|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/sinhong2011/minikyu --skill tailwind-v4-sinhong2011
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4
Source: https://github.com/sinhong2011/minikyu/tree/main/.agents/skills/tailwind-v4
Command: npx skills add https://github.com/sinhong2011/minikyu --skill tailwind-v4-sinhong2011

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers configure and utilize Tailwind CSS v4, a modern CSS framework that emphasizes a CSS-first configuration approach, OKLCH color spaces, and efficient build processes.

Core Features & Use Cases

  • Tailwind v4 Setup: Guides through installing and configuring the @tailwindcss/vite plugin.
  • Theming & Design Tokens: Demonstrates using the @theme directive for defining colors, fonts, spacing, and animations with OKLCH.
  • Dark Mode: Explains and provides examples for implementing media query, class-based, and attribute-based dark mode strategies.
  • Use Case: A developer starting a new project with React and Vite can use this Skill to quickly set up Tailwind v4, define a custom color palette using OKLCH, and implement a user-selectable dark mode.

Quick Start

Configure Tailwind v4 in your Vite project by adding the @tailwindcss/vite plugin to your vite.config.ts file.

Frequently Asked Questions about tailwind-v4

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

FAQPage Schema
How do I set up Tailwind CSS v4 with Vite?

To set up Tailwind CSS v4 with Vite, you configure the framework by adding the `@tailwindcss/vite` plugin directly to your `vite.config.ts` file. This integration enables efficient build processes for modern web development projects.

What is the `@theme` directive used for in Tailwind v4?

The `@theme` directive in Tailwind v4 is used for defining theming and design tokens. It allows you to configure colors, fonts, spacing, and animations directly within your CSS, utilizing the OKLCH color space for modern styling.

How does dark mode work in Tailwind CSS v4?

Dark mode in Tailwind CSS v4 works through media query, class-based, or attribute-based strategies. You can implement user-selectable dark modes by leveraging these distinct approaches alongside CSS variable conventions.

Can I use OKLCH colors when configuring Tailwind v4 themes?

Yes, you can use OKLCH colors when configuring Tailwind v4 themes. The framework emphasizes a CSS-first configuration approach that specifically incorporates the OKLCH color system for defining custom color palettes and design tokens.

Does Tailwind v4 require a JavaScript configuration file?

Tailwind v4 does not require a traditional JavaScript configuration file, as it emphasizes a CSS-first configuration approach. You define your theming, design tokens, and conventions directly inside your CSS using the `@theme` directive.