---
name: tailwindcss
description: Tailwind CSS utility-first CSS framework. Use when styling web applications with utility classes, building responsive designs, or customizing design systems with theme variables.
metadata:
  author: Hairyf
  version: "2026.2.2"
  source: Generated from https://github.com/tailwindlabs/tailwindcss.com, scripts located at https://github.com/hairyf/skills
title: tailwindcss
canonical_url: https://skilld.dev/gh/hairyf/skills
last_updated: 2026-09-27T13:55:01.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> 44 supporting files sit beside this SKILL.md. When the Skill refers to one, fetch https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/PATH with PATH replaced.
>
> If the user asked to install this Skill, run `npx skilld install hairyf/skills/tailwindcss`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/tailwindcss`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/hairyf/skills/tailwindcss) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/tailwindcss`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/tailwindcss --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/tailwindcss --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Tailwind CSS

> The skill is based on Tailwind CSS v4.1.18, generated at 2026-01-28.

Tailwind CSS is a utility-first CSS framework for rapidly building custom user interfaces. Instead of writing custom CSS, you compose designs using utility classes directly in your markup. Tailwind v4 introduces CSS-first configuration with theme variables, making it easier to customize your design system.

## Core References

| Topic | Description | Reference |
|-------|-------------|-----------|
| Installation | Vite, PostCSS, CLI, and CDN setup | [core-installation](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/core-installation.md) |
| Utility Classes | Understanding Tailwind's utility-first approach and styling elements | [core-utility-classes](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/core-utility-classes.md) |
| Theme Variables | Design tokens, customizing theme, and theme variable namespaces | [core-theme](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/core-theme.md) |
| Responsive Design | Mobile-first breakpoints, responsive variants, and container queries | [core-responsive](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/core-responsive.md) |
| Variants | Applying utilities conditionally with state, pseudo-class, and media query variants | [core-variants](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/core-variants.md) |
| Preflight | Tailwind's base styles and how to extend or disable them | [core-preflight](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/core-preflight.md) |

## Layout

### Display & Flexbox & Grid

| Topic | Description | Reference |
|-------|-------------|-----------|
| Display | flex, grid, block, inline, hidden, sr-only, flow-root, contents | [layout-display](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-display.md) |
| Flexbox | flex-direction, justify, items, gap, grow, shrink, wrap, order | [layout-flexbox](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-flexbox.md) |
| Grid | grid-cols, grid-rows, gap, place-items, col-span, row-span, subgrid | [layout-grid](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-grid.md) |
| Aspect Ratio | Controlling element aspect ratio for responsive media | [layout-aspect-ratio](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-aspect-ratio.md) |
| Columns | Multi-column layout for magazine-style or masonry layouts | [layout-columns](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-columns.md) |

### Positioning

| Topic | Description | Reference |
|-------|-------------|-----------|
| Position | Controlling element positioning with static, relative, absolute, fixed, and sticky | [layout-position](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-position.md) |
| Inset | Controlling placement of positioned elements with top, right, bottom, left, and inset utilities | [layout-inset](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-inset.md) |

### Sizing

| Topic | Description | Reference |
|-------|-------------|-----------|
| Width | Setting element width with spacing scale, fractions, container sizes, and viewport units | [layout-width](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-width.md) |
| Height | Setting element height with spacing scale, fractions, viewport units, and content-based sizing | [layout-height](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-height.md) |
| Min & Max Sizing | min-width, max-width, min-height, max-height constraints | [layout-min-max-sizing](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-min-max-sizing.md) |

### Spacing

| Topic | Description | Reference |
|-------|-------------|-----------|
| Margin | Controlling element margins with spacing scale, negative values, logical properties, and space utilities | [layout-margin](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-margin.md) |
| Padding | Controlling element padding with spacing scale, logical properties, and directional utilities | [layout-padding](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-padding.md) |

### Overflow

| Topic | Description | Reference |
|-------|-------------|-----------|
| Overflow | Controlling how elements handle content that overflows their container | [layout-overflow](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-overflow.md) |

### Images & Replaced Elements

| Topic | Description | Reference |
|-------|-------------|-----------|
| Object Fit & Position | Controlling how images and video are resized and positioned | [layout-object-fit-position](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-object-fit-position.md) |

### Tables

| Topic | Description | Reference |
|-------|-------------|-----------|
| Table Layout | border-collapse, table-auto, table-fixed | [layout-tables](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/layout-tables.md) |

## Transforms

| Topic | Description | Reference |
|-------|-------------|-----------|
| Transform Base | Base transform utilities for enabling transforms, hardware acceleration, and custom transform values | [transform-base](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/transform-base.md) |
| Translate | Translating elements on x, y, and z axes with spacing scale, percentages, and custom values | [transform-translate](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/transform-translate.md) |
| Rotate | Rotating elements in 2D and 3D space with degree values and custom rotations | [transform-rotate](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/transform-rotate.md) |
| Scale | Scaling elements uniformly or on specific axes with percentage values | [transform-scale](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/transform-scale.md) |
| Skew | Skewing elements on x and y axes with degree values | [transform-skew](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/transform-skew.md) |

## Typography

| Topic | Description | Reference |
|-------|-------------|-----------|
| Font & Text | Font size, weight, color, line-height, letter-spacing, decoration, truncate | [typography-font-text](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/typography-font-text.md) |
| Text Align | Controlling text alignment with left, center, right, justify, and logical properties | [typography-text-align](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/typography-text-align.md) |
| List Style | list-style-type, list-style-position for bullets and markers | [typography-list-style](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/typography-list-style.md) |

## Visual

| Topic | Description | Reference |
|-------|-------------|-----------|
| Background | Background color, gradient, image, size, position | [visual-background](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/visual-background.md) |
| Border | Border width, color, radius, divide, ring | [visual-border](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/visual-border.md) |
| Effects | Box shadow, opacity, mix-blend, backdrop-blur, filter | [visual-effects](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/visual-effects.md) |
| SVG | fill, stroke, stroke-width for SVG and icon styling | [visual-svg](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/visual-svg.md) |

## Effects & Interactivity

| Topic | Description | Reference |
|-------|-------------|-----------|
| Transition & Animation | CSS transitions, animation keyframes, reduced motion | [effects-transition-animation](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/effects-transition-animation.md) |
| Visibility & Interactivity | Visibility, cursor, pointer-events, user-select, z-index | [effects-visibility-interactivity](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/effects-visibility-interactivity.md) |
| Form Controls | accent-color, appearance, caret-color, resize | [effects-form-controls](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/effects-form-controls.md) |
| Scroll Snap | scroll-snap-type, scroll-snap-align for carousels | [effects-scroll-snap](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/effects-scroll-snap.md) |

## Features

### Dark Mode

| Topic | Description | Reference |
|-------|-------------|-----------|
| Dark Mode | Implementing dark mode with the dark variant and custom strategies | [features-dark-mode](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/features-dark-mode.md) |

### Migration

| Topic | Description | Reference |
|-------|-------------|-----------|
| Upgrade Guide | Migrating from v3 to v4, breaking changes, rename mappings | [features-upgrade](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/features-upgrade.md) |

### Customization

| Topic | Description | Reference |
|-------|-------------|-----------|
| Custom Styles | Adding custom styles, utilities, variants, and working with arbitrary values | [features-custom-styles](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/features-custom-styles.md) |
| Functions & Directives | Tailwind's CSS directives and functions for working with your design system | [features-functions-directives](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/features-functions-directives.md) |
| Content Detection | How Tailwind detects classes and how to customize content scanning | [features-content-detection](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/features-content-detection.md) |

## Best Practices

| Topic | Description | Reference |
|-------|-------------|-----------|
| Utility Patterns | Managing duplication, conflicts, important modifier, when to use components | [best-practices-utility-patterns](https://skilld.dev/api/skills-raw/hairyf/skills/tailwindcss/references/best-practices-utility-patterns.md) |

## Key Recommendations

- **Use utility classes directly in markup** - Compose designs by combining utilities
- **Customize with theme variables** - Use `@theme` directive to define design tokens
- **Mobile-first responsive design** - Use unprefixed utilities for mobile, prefixed for breakpoints
- **Use complete class names** - Never construct classes dynamically with string interpolation
- **Leverage variants** - Stack variants for complex conditional styling
- **Prefer CSS-first configuration** - Use `@theme`, `@utility`, and `@custom-variant` over JavaScript configs
