
Tailwind CSS
SkillGeneral guidance for building UI with Tailwind CSS: responsive and state variants, dark mode, sparing arbitrary values, components before @apply, and pitfalls such as dynamically built class names missing in production, with button and hero examples.
name: tailwindcss
description: Use when designing/implementing UI with Tailwind CSS (layout, typography, responsive, theming, component patterns). Includes quick recipes and conventions for clean, consistent web design.
Tailwind CSS — Utility-first Styling Skill
When to use
- Rapid UI building with consistent spacing/typography scales
- Design systems where composition beats bespoke CSS
- Component-driven apps (React/Vue/Svelte), marketing pages, prototypes → production
Key concepts & patterns
- Utilities compose in HTML/JSX:
class="flex gap-4 p-6 bg-zinc-950 text-white" - Responsive variants:
sm: md: lg: xl:etc. - State variants:
hover:,focus:,active:,disabled:,group-hover:,peer-checked: - Arbitrary values (use sparingly):
w-[42rem],bg-[#0b1220],translate-y-[3px] - Dark mode patterns:
dark:with class-based strategy - Extracting repeated patterns:
- Prefer components (JSX/Vue components) first
- Then
@applyfor small reusable patterns (avoid overuse)
- Build pipeline:
- Tailwind scans “content” files for class names and generates CSS (zero-runtime)
Common pitfalls
- Classes not generated in production
- Ensure content paths include all templates/components.
- Avoid building class names dynamically (e.g.
"text-" + color) unless safelisted.
- Overusing
@applyand losing the utility-first benefits - Conflicting styles due to class order assumptions
- Huge HTML class lists with no structure
- Use component composition; break into subcomponents; use
clsx/cvawhen needed.
- Use component composition; break into subcomponents; use
Quick recipes
1) A clean CTA button
<button class="inline-flex items-center justify-center rounded-xl px-5 py-3
bg-indigo-600 text-white font-medium
hover:bg-indigo-500 active:bg-indigo-700
focus:outline-none focus:ring-2 focus:ring-indigo-400/60">
Get started
</button>
2) Responsive hero layout
<section class="mx-auto max-w-6xl px-6 py-16">
<div class="grid gap-10 lg:grid-cols-2 lg:items-center">
<div>
<h1 class="text-4xl font-semibold tracking-tight sm:text-5xl">
Ship a beautiful site fast.
</h1>
<p class="mt-4 text-zinc-600">
Tailwind helps you move quickly without fighting CSS.
</p>
</div>
<div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm">
<!-- media -->
</div>
</div>
</section>
3) Handling dynamic classnames safely
Prefer mapping:
const toneClass = {
success: "bg-emerald-600",
danger: "bg-rose-600",
info: "bg-sky-600",
}[tone];
What to ask the user
- Framework/build tool (Next/Vite/Remix/Webflow export)?
- Do we need a design system (tokens, component library) or a one-off page?
- Dark mode? RTL? accessibility constraints?
Ähnliche Ressourcen

Budge
SkillWhen the agent changes a single CSS value or Tailwind class in a Next.js App Router project, a floating bar appears on the page so you can fine-tune it with arrow keys before persisting. Loads a runtime script from budge.design in app/layout.tsx.
millionco/skills34
UnoCSS
SkillReference for UnoCSS, the atomic CSS engine: config, rules, shortcuts, theme and variants, presets like Wind3, Wind4, Icons and Attributify, and Vite and Nuxt setup. Tells the agent to check uno.config first and stick to plain classes when unsure. Generated by Anthony Fu from official docs.
antfu/skills6k
Animation On Scroll
SkillAdds scroll-reveal animations that fire when elements enter the viewport, using an IntersectionObserver snippet plus keyframes and a Tailwind arbitrary animation class; tune threshold, rootMargin, duration, delay and play-once behavior.
MengTo/Skills6.8k
Beautiful Shadows
SkillGives the agent three exact Tailwind arbitrary-value shadow utilities (sm, md, lg) for layered, neutral elevation on cards, controls, popovers and hero media, with rules against mixing them with default shadows, tinting or stacking.
MengTo/Skills6.8k
Container Lines
SkillAdds thin vertical guide lines at the content container edges plus small corner squares for a measured, structured layout, with CSS tokens and pseudo-element code that keeps guides behind content and out of pointer events.
MengTo/Skills6.8k
Landing Page Design
SkillBuilds landing pages in two halves: intake questions, page structure, layout choice, conversion copy and SEO first, then a strict visual system for fonts, Tailwind type scale, spacing, radius, backgrounds, icons and motion. The rules are opinionated, e.g. no Inter font and no background gradients.
elayadesign/ai-design-skills2.7k