Quick start
The fastest way to migrate is using the automated upgrade tool:Configuration changes
CSS-first configuration
The biggest change in v4 is moving from JavaScript configuration to CSS-based configuration using@theme.
Before (v3):
Import syntax
Replace Tailwind directives with a single import: Before (v3):Content configuration
Content detection is now automatic. No configuration needed! Before (v3):Utility class changes
Shadow utilities renamed
Inset shadows:
Drop shadows:
Border radius utilities renamed
Blur utilities renamed
Positioning utilities
The
start-* and end-* utilities are deprecated in favor of more explicit names.Background position utilities
Object position utilities
Text wrapping
Order utilities
Outline utilities
Removed utilities
max-w-autoandmax-h-auto- Generated invalid CSSmin-w-noneandmin-h-none- Invalid CSS valuesmax-w-screen-*- Use container queries or custom values instead
Theme variable changes
Namespace changes
Theme variables now use more intuitive namespaces:Spacing scale changes
v4 introduces a dynamic spacing scale based on a single--spacing multiplier:
Before (v3):
Font weight changes
Font weights are now theme variables instead of static utilities: Before (v3): Static utilities:font-thin, font-bold, etc.
After (v4):
Color system changes
P3 color palette
v4 includes a modernized color palette using the P3 color space for wider gamut displays. New color palettes added:mauveolivemisttaupe
Color mixing
v4 usescolor-mix() for opacity modifiers with automatic fallbacks:
Variant changes
New variants
v4 adds many new variants for modern CSS features:
inverted-colors- Target inverted color modepointer-none/coarse/fine- Pointer capabilitiesany-pointer-none/coarse/fine- Any input pointer
user-validanduser-invalid- User interaction validation statesdetails-content- Style content within details elementnoscript- Target noscript context
**- All descendants (replaces[&_*])in-*- Element in a container (replaces somegroup-[]patterns)
Variant syntax changes
Group and peer variants: Some arbitrary group/peer variants now usein-*:
Before (v3):
Custom variants
v3 JavaScript variant configuration moves to CSS: Before (v3):Plugin system changes
Official plugins
Bundled plugins:@tailwindcss/forms- Updated for v4@tailwindcss/typography- Updated for v4@tailwindcss/aspect-ratio- No longer needed, aspect ratio is built-in
Custom utilities
v3 JavaScript utilities move to CSS: Before (v3):Build tool changes
Vite projects
Use the new first-party Vite plugin:PostCSS projects
Update to the new PostCSS plugin:Autoprefixer is now built-in and no longer required as a separate plugin.
CLI
The standalone CLI is now available:New features to explore
After migrating, take advantage of v4’s new features:Container queries
Built-in container query support:3D transforms
New 3D transform utilities:Starting style
Create enter/exit transitions without JavaScript:Not variant
Style elements when they don’t match a condition:Text shadow utilities
New built-in text shadow support:Mask utilities
CSS mask utilities:Migration checklist
Use this checklist to ensure a complete migration:Getting help
If you encounter migration issues:- Review the Upgrade Guide for general guidance
- Check the Codemods documentation for tool usage
- Visit GitHub Discussions
- Read the full CHANGELOG