tailwind-ui
Skill1 starsChanged 46 days agoMITView on GitHub
Tailwind CSS v4 guidance — Vite plugin setup, CSS-first @theme configuration, v4 syntax changes, container queries, dark-mode custom variant, logical properties, and design-token discipline.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- techbuzzz/awesome-opencodetheir own version, first seen Jul 17, 2026
- bishal-pal/Tailwind-Repotheir own version, first seen Jun 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- techbuzzz/awesome-opencode★ 2same name
- bishal-pal/Tailwind-Repo★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository81 other files it gives its agents.
- accessibility-action-planSkill
- accessibility-auditSkill
- accessibility-finding-explainerSkill
- accessibility-report-summarySkill
- agent-config-authoringSkill
- agents-sdkSkill
- ai-ux-patternsSkill
- alt-text-generatorSkill
- anti-ai-copySkill
- aria-usage-reviewSkill
- astro-architectureSkill
- astro-client-scriptsSkill
- astro-component-a11y-reviewSkill
- before-after-accessibility-commsSkill
- bfsg-risk-language-softenerSkill
- biomeSkill
- blog-from-transcriptSkill
- brand-voice-dnaSkill
- case-study-from-auditSkill
- client-email-after-auditSkill
- cloudflare-email-serviceSkill
- cloudflare-one-migrationsSkill
- cloudflare-oneSkill
- cloudflareSkill
- complexity-judgmentSkill
- component-doc-writerSkill
- content-clarity-a11y-checkSkill
- content-qaSkill
- conversation-retrospectiveSkill
- darkmodeSkill
- deep-researchSkill
- design-directionsSkill
- design-systemsSkill
- durable-objectsSkill
- faq-from-issuesSkill
- form-accessibility-reviewSkill
- frontend-designSkill
- handoffSkill
- i18nSkill
- image-to-webpSkill
- keyboard-navigation-reviewSkill
- knowledge-baseSkill
- landing-and-site-builderSkill
- landingpage-from-briefingSkill
- lighthouse-axe-result-explainerSkill
- linkedin-post-from-contentSkill
- llm-councilSkill
- local-business-seoSkill
- mcp-builderSkill
- mdx-contentSkill
- motion-designSkill
- native-html-uiSkill
- newsletter-from-auditSkill
- overlay-tool-risk-explainerSkill
- playwrightSkill
- post-auditSkill
- remotionSkill
- sandbox-migrate-to-nextSkill
- sandbox-nextSkill
- sandbox-sdkSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Prefer consistency over one-off styling experiments.
- Distinctive: line 11
Keep class lists readable — extract repeated patterns into components.
- Distinctive: line 12
Use arbitrary values only when justified.
- Very specific: line 51
Keep a shared @theme block that registers your design tokens, then reference them via var() in component styles and via the matching …
- Very specific: line 102
Use var(--token) inside scoped <style> blocks.
- Very specific: line 118
Prefer tokens for structural colors (var(--color-bg) flips automatically when .dark is set) and dark: utilities for one-offs.
- Distinctive: line 142
Prefer logical utilities for inline-axis spacing so layouts survive RTL:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tailwind UI
Principles
- Prefer consistency over one-off styling experiments.
- Keep class lists readable — extract repeated patterns into components.
- Use arbitrary values only when justified.
- Preserve visible focus and interaction states (hover, focus, disabled, active).
- Design tokens (CSS custom properties) first, Tailwind utilities on top.
Setup
Tailwind v4 uses a Vite plugin, not PostCSS:
// astro.config.mjs
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
vite: { plugins: [tailwindcss()] },
});CSS entry:
/* src/styles/app.css */
@import 'tailwindcss';
@import '@fontsource/inter/latin-400.css';CSS-first configuration
Tailwind v4 is configured via CSS, not tailwind.config.js:
@import 'tailwindcss';
@theme {
--color-primary: oklch(58% 0.18 220);
--color-accent: oklch(68% 0.16 250);
--font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
}Keep a shared @theme block that registers your design tokens, then reference them via var() in component styles and via the matching Tailwind utilities (e.g. bg-accent).
v4 syntax changes (from v3)
Renamed classes
bg-gradient-to-r → bg-linear-to-r
bg-gradient-to-br → bg-linear-to-br
flex-shrink-0 → shrink-0
flex-grow → grow
aspect-[3/2] → aspect-3/2
grayscale-[30%] → grayscale-30Container queries (built in)
<div class="@container">
<div class="@sm:flex @md:grid @md:grid-cols-2 @lg:grid-cols-3">
<!-- Responds to the container, not the viewport -->
</div>
</div>Native CSS nesting
.card {
background: var(--color-surface);
&:hover { box-shadow: var(--shadow-md); }
& h2 { font-weight: 700; }
}Design tokens
Typical token groups to define in @theme (or a shared variables.css):
- Colors —
--color-bg,--color-surface,--color-text,--color-text-secondary,--color-border,--color-accent,--color-accent-hover,--color-success,--color-warning,--color-error,--color-info. - Spacing —
--space-xs…--space-3xl. - Typography —
--font-sans,--font-serif,--font-mono. - Radii —
--radius-sm…--radius-full, plus component-specific--card-radius,--button-radius,--input-radius. - Shadows —
--shadow-sm…--shadow-xl. - Transitions —
--transition-fast(150 ms),--transition-base(200 ms),--transition-slow(300 ms). - Z-index scale —
--z-dropdown…--z-tooltip.
Use var(--token) inside scoped <style> blocks; use the matching Tailwind utility in markup. Never hard-code color values.
Dark mode
Class-based, with a custom variant in the CSS entry:
@custom-variant dark (&:where(.dark, .dark *));Both mode-aware tokens and explicit dark: utilities are fine:
<div class="bg-white dark:bg-neutral-900 text-neutral-900 dark:text-neutral-100">Prefer tokens for structural colors (var(--color-bg) flips automatically when .dark is set) and dark: utilities for one-offs.
Tailwind v4.2 features
Font-feature utilities
<code class="font-variant-[ligatures_contextual]">fn() => {}</code>
<td class="tabular-nums">1,234.56</td>
<span class="small-caps">Section Title</span>Apply ligatures and tabular numbers to code/pre and heading elements in a global stylesheet.
New neutral color palettes
v4.2 adds mauve, taupe, olive, mist alongside gray, slate, zinc, stone. No config needed — they behave like any Tailwind color:
<div class="bg-mist-50 dark:bg-mist-950 text-taupe-900">Logical properties (i18n / RTL-ready)
Prefer logical utilities for inline-axis spacing so layouts survive RTL:
pl-4 / pr-4 → ps-4 / pe-4 (padding-inline-start/end)
ml-4 / mr-4 → ms-4 / me-4 (margin-inline-start/end)
border-l-* → border-s-* (border-inline-start)Physical block-axis utilities (pt-*, pb-*, mt-*, mb-*) remain unchanged.
Webpack plugin
@tailwindcss/webpack is first-class in v4.2 — irrelevant for Vite/Astro projects.
Best practices
- Design tokens for everything —
var(--color-*)over hardcoded values. - Scoped component styles in
<style>blocks for component-specific CSS. - Tailwind for utility-scale adjustments directly in markup.
- Mobile-first:
sm:,md:,lg:breakpoints ascending. - OKLCH for colors — predictable lightness across themes.
- No
tailwind.config.js— everything via CSS or tokens.
Review checklist
- Is the class list still readable? Extract component classes where it isn't.
- Are repeated patterns extracted into reusable components?
- Are responsive rules consistent (same breakpoints, same order)?
- Are hover, focus, disabled, and active states complete?
- Are all colors sourced from tokens — not hex values — so light/dark stay in sync?
- Are inline-axis spacings using logical utilities (
ps-*/pe-*) where RTL support matters?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

