Thanks to visit codestin.com
Credit goes to tailuicss.com

v2.4.0 — Now Available

Stop writing 40 classes per element.

TailUI is a semantic CSS layer on top of Tailwind CSS. Write class="ui-button ui-primary" instead of a wall of utility classes.

Why TailUI?

Everything you need to build beautiful, maintainable UIs — without the class soup.

CSS-First

Zero JavaScript runtime. Pure CSS selectors powered by Tailwind. No bundle bloat, no hydration cost.

Free Composition

Combine any tokens freely. No rigid hierarchy, no whitelist. class="ui-card ui-elevated ui-hoverable" just works.

Framework Agnostic

Works with React, Vue, Svelte, Angular, plain HTML — any framework that renders HTML.

Design System Ready

Built for scale. Tokens, themes, dark mode, whitelabel — everything a modern design system needs.

Powerful CLI

6 commands: init, create, add, list, generate, config. Interactive setup with stack detection and AI configuration.

Dark Mode Built-in

First-class dark mode support via data-theme on all 20 components. Switch themes without touching a single component.

20 Components

Button, Card, Input, Modal, Badge, Alert, Toast, Toggle, Select, Dropdown, Accordion, Avatar, Progress, and more.

AI Generation

Generate typed, accessible framework components with OpenAI, Claude, Gemini, or Mistral. Your styles, your stack.

Clean Components, Beautiful Styles

Write CSS the way you love it.
Keep your components clean.

TailUI lets you combine custom CSS with Tailwind utilities — all in dedicated stylesheet files. Your React, Vue, Svelte, and Angular components stay readable, maintainable, and free of style pollution.

Without TailUI — Style pollution
Button.tsx
// Button.tsx 😵 Unreadable mess
export function Button({ children, variant, size }) {
return (
<button
className={`
px-4 py-2 rounded-lg font-medium
transition-all duration-200
focus:outline-none focus:ring-2
focus:ring-offset-2 disabled:opacity-50
disabled:cursor-not-allowed
${variant === 'primary'
? 'bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-blue-500'
: variant === 'danger'
? 'bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-red-500'
: 'bg-gray-100 text-gray-900 hover:bg-gray-200 border border-gray-200'}
${size === 'sm' ? 'text-sm px-3 py-1.5' : size === 'lg' ? 'text-lg px-6 py-3' : ''}
`}
>
{children}
</button>
);
}

Problems: Logic mixed with styles • Hard to read • Hard to maintain • Conditional classes everywhere • No separation of concerns

With TailUI — Clean separation
Button.tsx
// Button.tsx 😍 Crystal clear
export function Button({ children, variant, size }) {
return (
<button className={`ui-button ui-${variant} ui-${size}`}>
{children}
</button>
);
}
button.css
/* button.css — All styles in one place */
@layer components {
.ui-button {
@apply px-4 py-2 rounded-lg font-medium;
@apply transition-all duration-200;
@apply focus:outline-none focus:ring-2 focus:ring-offset-2;
}
.ui-button.ui-primary {
@apply bg-blue-600 text-white hover:bg-blue-700;
}
.ui-button.ui-danger {
@apply bg-red-600 text-white hover:bg-red-700;
}
.ui-button.ui-sm { @apply text-sm px-3 py-1.5; }
.ui-button.ui-lg { @apply text-lg px-6 py-3; }
}

Benefits: Component logic only • Styles in CSS files • Easy to read • Easy to maintain • Full Tailwind power

Separation of Concerns

Styles live in CSS files. Components handle logic. The way it should be.

Full Tailwind Power

Use @apply, hover:, focus:, responsive prefixes — everything Tailwind offers.

Framework Agnostic

Same CSS works in React, Vue, Svelte, Angular, Astro, or plain HTML.

Ship Faster

Stop fighting with className strings. Write semantic classes, move on.

"I finally enjoy writing CSS again. TailUI gives me the best of both worlds — Tailwind's utility power with clean, semantic class names. My components have never been this readable."

— Every developer after switching to TailUI

See the difference

Same result. Fraction of the code. All the readability.

Before — Raw Tailwind
1<!-- Raw Tailwind CSS -->
2<button class="px-4 py-2 bg-blue-600
3 text-white rounded-lg font-medium
4 transition-all duration-200 cursor-pointer
5 inline-flex items-center justify-center
6 gap-2 text-sm hover:bg-blue-700
7 active:bg-blue-800 shadow-sm
8 hover:shadow-md">
9 Save Changes
10</button>
11
12<div class="rounded-xl border border-gray-200
13 bg-white text-gray-800 overflow-hidden
14 shadow-lg transition-all duration-200
15 hover:shadow-2xl hover:-translate-y-1">
16 <div class="flex items-center justify-between
17 px-5 py-4 border-b border-gray-100
18 font-semibold">
19 Dashboard
20 </div>
21 <div class="p-5">Content here</div>
22</div>
After — TailUI
1<!-- TailUI -->
2<button class="ui-button ui-primary">
3 Save Changes
4</button>
5
6<div class="ui-card ui-elevated ui-hoverable">
7 <div class="ui-header">Dashboard</div>
8 <div class="ui-body">Content here</div>
9</div>
~80%
Less code
reduction in markup
0kb
Zero runtime
JavaScript overhead
100%
Full power
of Tailwind under the hood

Up and running in 60 seconds

Three steps. No complex configuration.

1Install
npm install tailuicss tailwindcss postcss autoprefixer
2Configure
config
// tailwind.config.js
plugins: [require('tailuicss')()]
// postcss.config.js
plugins: { 'tailuicss/postcss': {}, tailwindcss: {} }
3Use
index.html
<!-- That's it. Start using it. -->
<button class="ui-button ui-primary">Save</button>
<div class="ui-card ui-elevated ui-hoverable">
<div class="ui-header">Dashboard</div>
<div class="ui-body">Your content</div>
</div>
Already have a project?

Migrate your existing code

Got verbose Tailwind classes scattered across your components? One command converts them to clean, semantic .ui-* classes.

Before — verbose utilities
src/components/SaveButton.tsx
export function SaveButton() {
return (
<button
className="px-4 py-2 rounded-lg font-medium text-sm
bg-blue-600 text-white hover:bg-blue-700
active:bg-blue-800 shadow-sm hover:shadow-md
transition-all duration-200 cursor-pointer
inline-flex items-center justify-center gap-2"
>
Save Changes
</button>
);
}
The magic command
# Migrate this specific file
npx tailui migrate -f src/components/SaveButton.tsx
# Or preview changes first (dry-run)
npx tailui migrate -f src/components/SaveButton.tsx --dry-run
# Migrate all components in a directory
npx tailui migrate --all src/components
After — semantic classes
src/components/SaveButton.tsx
export function SaveButton() {
return (
<button className="ui-button ui-primary">
Save Changes
</button>
);
}

Tag-first detection

HTML tags determine components — no guessing

Safe & reversible

Auto-backup before every change, undo anytime

Preserves structure

Keeps your margins, flex, grid classes intact

Loved by developers

Join hundreds of developers who write cleaner, faster, better CSS.

TailUI is exactly what I wished Tailwind had from the start. Our codebase went from unreadable to beautiful overnight. The ui attribute is genius.

SC
Sarah Chen
Senior Frontend Engineer at Vercel

We switched our entire SaaS to TailUI in a weekend. The DX improvement is insane — new devs onboard in minutes instead of hours.

MR
Marcus Rodriguez
CTO at LaunchPad

Finally, a tool that bridges the gap between design tokens and developer experience. TailUI is the missing layer we all needed.

AP
Aisha Patel
Design System Lead at Stripe

I ship 3x faster with TailUI. No more copy-pasting class strings. Just ui="button primary" and I'm done. Pure productivity.

TW
Thomas Weber
Indie Hacker & SaaS Builder

The composition model is brilliant. No rigid hierarchy, no whitelist — just combine tokens freely. It's how CSS should work.

YT
Yuki Tanaka
Frontend Lead at Linear

Zero runtime JS, works with every framework, and the CLI is a joy. TailUI is the most underrated tool in the ecosystem.

DO
David Okonkwo
Full-Stack Developer

Ready to write cleaner CSS?

Start using TailUI today. No migration needed — it works alongside your existing Tailwind setup.