tailwind

Implements Tailwind CSS v4 styling patterns including themes, dark mode, and shadcn/ui integration.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill tailwind-pohlai88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tailwind
Source: https://github.com/pohlai88/afenda-xforge-v5/tree/main/.agents/skills/tailwind
Command: npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill tailwind-pohlai88

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Styling modern web apps with Tailwind CSS v4 requires learning a new CSS-first configuration model, and developers frequently hit build errors, broken dark mode, and failed v3-to-v4 migrations without authoritative guidance. ## Core Features & Use Cases - CSS-First Configuration: Configure themes with @theme, @utility, @plugin, @source, and @reference directives instead of tailwind.config.js. - Design Tokens & Dark Mode: Build OKLCH-based semantic token systems with class-based or multi-theme dark mode switching. - shadcn/ui Integration & Migration: Set up shadcn/ui with the four-step architecture, migrate from Tailwind v3, and troubleshoot common build and styling errors. - Use Case: When upgrading a Next.js project from Tailwind v3 to v4, use this Skill to convert the config file into @theme blocks, replace tailwindcss-animate with tw-animate-css, and fix broken utility classes. ## Quick Start Use the tailwind skill to configure a Tailwind v4 theme with dark mode support in my app.css file.

Frequently Asked Questions about tailwind

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

FAQPage Schema
How do I configure Tailwind CSS v4 without tailwind.config.js?

Tailwind v4 uses CSS-first configuration where all theme settings live in a @theme block inside your CSS file. Define colors, fonts, and breakpoints as CSS variables like --color-brand, and load plugins with the @plugin directive instead of require().

How to migrate from Tailwind CSS v3 to v4?

Run the official upgrade tool with npx @tailwindcss/upgrade@latest, which updates dependencies and converts your config to @theme blocks. For complex setups, manually replace @tailwind directives with @import "tailwindcss", move utilities to @utility, and swap tailwindcss-animate for tw-animate-css.

Does Tailwind v4 support class-based dark mode?

Yes, Tailwind v4 supports class-based dark mode by defining @custom-variant dark (&:where(.dark, .dark *)) in your CSS. This makes the dark: variant respond to a .dark class on the html element instead of prefers-color-scheme.

Why is bg-primary not applying styles in Tailwind v4?

The bg-primary utility fails when the @theme inline mapping block is missing. Add --color-primary: var(--primary) inside @theme inline so Tailwind generates the utility class from your CSS variable.

Can I use shadcn/ui with Tailwind CSS v4?

Yes, shadcn/ui works with Tailwind v4 by setting "config": "" in components.json and deleting tailwind.config.ts. Define :root and .dark variables at root level, map them in @theme inline, and use tw-animate-css instead of tailwindcss-animate.

When should I use @theme inline versus @theme?

Use @theme inline for single-theme setups with a light/dark toggle, such as the default shadcn/ui pattern, since values are inlined at build time. Use @theme without inline for multi-theme systems or dynamic theme switching, because it keeps runtime variable references.