tailwind-ui

tailwind-ui

Tailwind CSS v4.1 best practices with WCAG 2.1 AA accessibility, theming, and dark mode support. Use when working with HTML, CSS, styling components, accessibility (a11y), WCAG compliance, color contrast, focus states, screen readers, theming, light mode, dark mode, or building accessible UI patterns like buttons, forms, cards, and navigation. Complements the angular-best-practices skill for Angular frontends.

4stars
1forks
Updated 2/2/2026
SKILL.md
readonlyread-only
name
tailwind-ui
description

Tailwind CSS v4.1 best practices with WCAG 2.1 AA accessibility, theming, and dark mode support. Use when working with HTML, CSS, styling components, accessibility (a11y), WCAG compliance, color contrast, focus states, screen readers, theming, light mode, dark mode, or building accessible UI patterns like buttons, forms, cards, and navigation. Complements the angular-best-practices skill for Angular frontends.

Tailwind UI Skill

Tailwind CSS v4.1 development with accessibility and theming baked in.

Quick Reference

v4.1 Critical Changes

Never use deprecated utilities — always use replacements:

Deprecated Replacement
bg-opacity-* bg-black/50 (opacity modifier)
bg-gradient-* bg-linear-*
shadow-sm shadow-xs
shadow shadow-sm
rounded-sm rounded-xs
rounded rounded-sm
ring ring-3
outline-none outline-hidden
leading-* Use text-base/7 line-height modifiers
flex-shrink-* / flex-grow-* shrink-* / grow-*
space-x-* in flex/grid Use gap-* instead

Essential Patterns

<!-- Gap over space utilities -->
<div class="flex gap-4">...</div>

<!-- Opacity modifiers -->
<div class="bg-primary-500/60">...</div>

<!-- Line height modifiers -->
<p class="text-base/7">...</p>

<!-- Dynamic viewport height (mobile-safe) -->
<div class="min-h-dvh">...</div>

<!-- Size utility for equal dimensions -->
<div class="size-12">...</div>

Reference Files

Load these based on the task:

Theme Asset

Core Principles

  1. Use Tailwind's scale — Avoid arbitrary values like ml-[16px]; use ml-4
  2. Never use @apply — Use CSS variables or framework components
  3. Gap over margins — Use gap-* in flex/grid, not space-* or child margins
  4. Test both modes — Always verify light AND dark mode appearance
  5. Accessibility first — Every interactive element needs visible focus states and proper contrast

You Might Also Like

Related Skills

verify

verify

243K

Use when you want to validate changes before committing, or when you need to check all React contribution requirements.

facebook avatarfacebook
Get
test

test

243K

Use when you need to run tests for React core. Supports source, www, stable, and experimental channels.

facebook avatarfacebook
Get

Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.

facebook avatarfacebook
Get

Use when adding new error messages to React, or seeing "unknown error code" warnings.

facebook avatarfacebook
Get
flow

flow

243K

Use when you need to run Flow type checking, or when seeing Flow type errors in React code.

facebook avatarfacebook
Get
flags

flags

243K

Use when you need to check feature flag states, compare channels, or debug why a feature behaves differently across release channels.

facebook avatarfacebook
Get