Tailwind CSS
Comprehensive Tailwind CSS v4 reference covering utility classes, dark mode, states, responsive design, colors, layout, typography, customization with @theme, and more.
Installation & Setup
Install Tailwind CSS v4 and configure your project.
Installation (v4)
Install Tailwind CSS v4 with Vite, PostCSS, or the CLI.
Dark Mode
Style for light and dark color schemes using the dark: variant.
Dark Mode
Apply different styles in dark mode using the dark: variant.
States & Variants
Apply styles on hover, focus, active, and other interactive states.
Hover, Focus & Other States
Style elements based on pseudo-classes and interactive states.
Group & Peer Modifiers
Style elements based on parent or sibling state.
Colors & Opacity
Use the color palette and opacity modifiers across all utilities.
Color System & Opacity
Apply colors with the built-in palette and opacity shorthand.
Layout
Container, display, positioning, z-index, overflow, and columns.
Container & Display
Set container width, display type, and visibility.
Positioning & Z-Index
Position elements and control stacking order.
Flexbox & Grid
Layout with flexbox and CSS grid utilities.
Flexbox
Flexible box layout for rows and columns.
Grid
CSS Grid layout for complex two-dimensional layouts.
Spacing & Sizing
Padding, margin, width, height, and space between elements.
Padding & Margin
Control inner and outer spacing.
Width, Height & Aspect Ratio
Set element dimensions and aspect ratios.
Typography
Font sizing, weight, text color, decoration, alignment, and line clamp.
Font & Text
Control font size, weight, line height, and text styling.
Text Alignment & Wrapping
Align text and control overflow behavior.
Backgrounds & Borders
Background colors, gradients, border radius, rings, and outlines.
Backgrounds & Gradients
Background colors, images, and gradient utilities.
Borders, Rings & Radius
Border styling, focus rings, outlines, and rounded corners.
Effects & Filters
Shadows, opacity, blend modes, and CSS filters.
Shadows, Opacity & Filters
Box shadows, opacity, and visual filters.
Transitions & Animations
Smooth transitions, keyframe animations, and transforms.
Transitions & Transforms
Animate property changes and transform elements.
Keyframe Animations
Built-in and custom keyframe animations.
Responsive Design
Breakpoints, responsive patterns, and container queries.
Breakpoints & Responsive
Mobile-first responsive design with breakpoint prefixes.
Customization
Customize Tailwind with @theme, @apply, and arbitrary values.
@theme, @apply & Arbitrary Values
Extend the default theme, use utilities in custom CSS, and write one-off values.
Interactivity & Accessibility
Cursor, scroll behavior, screen readers, and tables.
Cursor, Scroll & Tables
Interactive behavior, scroll snap, and table styling.