tailwind

Solid

Patterns and conventions for all Tailwind styling. Use this skill whenever writing Tailwind class names, combining conditional classes, building component variants, or choosing between twJoin and twMerge. Also trigger when the user asks about custom values, defining @theme tokens or CSS variables, naming color/spacing tokens, rem vs px, responsive breakpoints, or avoiding template literal class strings.

Web & Frontend 20 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 77/100

Stars 20%
44
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Tailwind ## units Always use Tailwind units first. For custom values, always use `rem`, never `px`. ```jsx // BAD - tailwind units available but custom rem used return <div className="p-[1.0625rem]" />; // GOOD - uses tailwind units return <div className="p-4.25" />; ``` ## tailwind-merge Use tailwind-merge to concatenate class names in React components instead of template literals or array joins. - **`twJoin`**: for conditional class combinations (no override needed) - **`twMerge`**: allow class override (merges conflicting utilities; perfect for setting default and optional classes) ### Examples ```tsx import {twMerge, twJoin} from 'tailwind-merge'; // BAD, template literals with potential conflicts return <span className={`bg-gray-500 ${isBlue ? 'bg-blue-500' : ''}`} />; // GOOD - twJoin for conditional classes, but no override needed return <span className={twJoin('bg-gray-800', isBlue && 'text-blue-500')} />; // GOOD, twMerge for override, twJoin for conditional classes return <span className={twMerge('text-white', isBlue && 'text-blue-500')} />; ``` The key distinction: use `twMerge` when a component accepts a `className` prop that should be able to override defaults, `twJoin` would leave both conflicting classes on the element, but `twMerge` resolves the conflict: ```tsx // twMerge enables callers to override component defaults function Button({className}: {className?: string}) { return ( <button className={twMerge('bg-blue-500 px-4 py-2 tex...

Details

Author
gaia-react
Repository
gaia-react/gaia
Created
1 years ago
Last Updated
today
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

tailwind

Use when writing or fixing Tailwind CSS — in HTML, ERB/ViewComponent, JSX, Vue, or any template that carries utility classes. Covers design tokens, taming class soup, component-first extraction, dark mode, responsive layout, and accessibility. Triggers on "tailwind", "css", "styling", "dark mode", "responsive", "class soup", "@apply", "design system", or any "make this look right / fix this layout" request — even when styling isn't named explicitly, since templates almost always contain Tailwind classes.

0 Updated 2 days ago
mickzijdel
Web & Frontend Listed

tailwindcss-development

Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS.

1 Updated yesterday
rcdelfin
Web & Frontend Listed

styling

CSS and Tailwind styling guidelines. Use when writing styles, creating UI components, reviewing CSS/Tailwind code, or deciding on wrapper element structure.

0 Updated today
chenwei791129