tailwind-v4

Configure Tailwind CSS v4 with Vite plugin and OKLCH theming.

22|6|Updated Nov 25, 2025
One-click install
npx skills add https://github.com/Aniket-a14/SRA --skill tailwind-v4-aniket-a14
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4
Source: https://github.com/Aniket-a14/SRA/tree/main/.gemini/skills/tailwind-v4
Command: npx skills add https://github.com/Aniket-a14/SRA --skill tailwind-v4-aniket-a14

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 CSS-first configuration, OKLCH colors, and efficient build processes.

Core Features & Use Cases

  • Tailwind v4 Setup: Guides through Vite plugin integration and CSS entry points.
  • Theming & Design Tokens: Demonstrates the @theme directive for defining colors, spacing, fonts, and animations using OKLCH.
  • Dark Mode Strategies: Explains media query, class-based, and attribute-based approaches for implementing dark mode.
  • Use Case: Quickly set up a new project with Tailwind v4, define a custom color palette using OKLCH, and implement a user-toggleable dark mode.

Quick Start

Configure your Vite project to use Tailwind CSS v4 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?

Set up Tailwind CSS v4 with Vite by adding the @tailwindcss/vite plugin to your vite.config.ts file and configuring the CSS entry point. This integration replaces previous build configurations with a streamlined Vite plugin approach.

What is the @theme directive in Tailwind v4 and how does it work?

The @theme directive in Tailwind v4 provides CSS-first configuration for theming and design tokens. It allows you to define colors, spacing, fonts, and animations using OKLCH directly in your CSS.

Does Tailwind v4 support OKLCH colors for custom design palettes?

Yes, Tailwind v4 supports OKLCH colors for custom design palettes. The framework emphasizes CSS-first theming, allowing you to define color tokens using the OKLCH color space within the @theme directive.

What are the dark mode strategies available in Tailwind CSS v4?

Dark mode strategies in Tailwind CSS v4 include media query, class-based, and attribute-based approaches. You can implement a user-toggleable dark mode by configuring the appropriate mode in the @theme directive.

Can I define custom animations using CSS variables in Tailwind v4?

Yes, you can define custom animations using CSS variables in Tailwind v4. The framework uses specific CSS variable naming conventions within the @theme directive to register custom animation definitions.

Why should I use Tailwind v4 instead of previous Tailwind versions?

Tailwind v4 emphasizes CSS-first configuration, replacing JavaScript config files with the @theme directive. It integrates efficiently via the Vite plugin and introduces native OKLCH color support for modern design tokens.