Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Tailwind Css?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-tailwind-css-anvil)
---
name: tailwind-css
description: "Write maintainable Tailwind CSS: design tokens, static class names, variants, responsiveness and accessibility"
---
<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->
# Tailwind CSS patterns
Use when styling components, configuring theme tokens, or reviewing Tailwind class usage.
## Class composition rules
- Always use complete static class names (`isError ? "text-red-600" : "text-slate-700"`). Never assemble classes dynamically (`text-${color}-600`), because Tailwind's content scanner drops unresolvable strings in production builds.
- Configure design tokens once in `@theme` (v4) or `tailwind.config` (`theme.extend`) instead of repeating arbitrary hex values like `bg-[#1f2937]` across files.
- Prefer `class-variance-authority` (or typed variant maps) + `tailwind-merge` when reusable primitives accept caller `className` overrides.
## Layout and maintenance
- Extract repeated multi-element patterns into framework components (React/Svelte/Astro components) rather than hiding large class lists behind `@apply`.
- Use Tailwind's logical spacing/gap utilities (`flex gap-4`, `grid`) and responsive prefixes (`sm:`, `md:`, `lg:`) mobile-first without overriding base specificity.
## Accessibility and states
- Include clear `focus-visible:outline` styles, `disabled:` affordances, and sufficient color contrast across both light and dark tokens (`dark:`).
- Use `motion-reduce:` utilities for animations and `sr-only` for accessible icon-only control labels.
## Verify
Inspect production CSS build output for unexpected purges, check keyboard focus rings across interactive elements, and test narrow mobile plus desktop viewports.