tailwind-v4-configuration

Configures Tailwind CSS v4 via CSS-first workflows across Vite, PostCSS, and CLI.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/dev-khoi/conHack-2026 --skill tailwind-v4-configuration-dev-khoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind-v4-configuration
Source: https://github.com/dev-khoi/conHack-2026/tree/main/.opencode/skills/tailwind-v4-configuration
Command: npx skills add https://github.com/dev-khoi/conHack-2026 --skill tailwind-v4-configuration-dev-khoi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tailwind CSS v4 configuration can be complex due to its CSS-first approach, tooling changes, and plugin system; this Skill provides a structured path to configure v4 across Vite, PostCSS, and standalone CLI, including content detection and theming.

Core Features & Use Cases

  • CSS-first configuration enables a single source of truth in CSS using @theme and CSS directives.
  • Automatic content detection and template discovery streamline project setup and upgrades.
  • Plugin integration and theme customization across multiple toolchains (Vite, PostCSS, CLI) for consistent styling.
  • Migration guidance for moving from Tailwind v3 to v4 with minimal friction and clear steps.

Quick Start

Install Tailwind v4 and enable a CSS-first workflow by importing tailwindcss into your stylesheet and applying a CSS @theme configuration for immediate styling.

Frequently Asked Questions about tailwind-v4-configuration

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

FAQPage Schema
How do I configure Tailwind CSS v4 using the new CSS-first approach?

Tailwind CSS v4 uses a CSS-first configuration where you import tailwindcss directly into your stylesheet and define theme variables using the @theme directive. This establishes a single source of truth in your CSS without needing a JavaScript config file.

What is the best way to migrate my existing project from Tailwind v3 to v4?

Migrating from Tailwind v3 to v4 involves adopting the CSS-first workflow, updating your tooling setup, and moving theme configurations into @theme directives. The process provides clear steps to ensure minimal friction and automatic content detection during the upgrade.

Does Tailwind v4 work with Vite and PostCSS for automatic content detection?

Yes, Tailwind v4 integrates with Vite, PostCSS, and standalone CLI. These toolchains support automatic content detection and template discovery, streamlining your project setup by automatically scanning files without manual path configuration.

How do I add custom themes and plugins in Tailwind CSS v4?

Custom themes and plugins in Tailwind CSS v4 are managed directly in your CSS using @theme for theme variables and specific CSS directives for plugin integration. This approach ensures consistent styling across multiple toolchains.

Why do I need to use @theme for styling in Tailwind v4 instead of a config file?

The @theme directive in Tailwind v4 replaces the traditional JavaScript config file to provide a single source of truth directly in CSS. It enables CSS-first configuration, allowing you to define theme variables and ensure automatic content detection natively.

Can I set up Tailwind v4 with a standalone CLI without a bundler?

Yes, Tailwind v4 supports a framework-agnostic setup using the standalone CLI. This allows you to apply CSS-first configuration, automatic content detection, and plugin directives without requiring a bundler like Vite or PostCSS.