Tailwind CSS v4 Migration Guide: What Changed and What Breaks
GuideApril 7, 2026·10 min read

Tailwind CSS v4 Migration Guide: What Changed and What Breaks

Everything you need to know about migrating from Tailwind CSS v3 to v4. New class names, config changes, breaking changes, and a step-by-step upgrade checklist.

Tailwind CSS v4 shipped with a new engine, new class names, and some breaking changes. Here's what you need to know to migrate smoothly.

What's New in v4

  • New engine — Built on Oxide, significantly faster builds
  • CSS-first configuration — Configure in CSS instead of JavaScript
  • New class names — Some utilities were renamed for consistency
  • Browser build@tailwindcss/browser replaces the CDN script

Breaking Changes

v3 v4
bg-gradient-to-rbg-linear-to-r
bg-opacity-50bg-black/50 (color opacity)
backdrop-blur-smbackdrop-blur-xs
tailwind.config.jsCSS-based config with @theme
cdn.tailwindcss.com@tailwindcss/browser

Migration Checklist

  1. Update the Tailwind CSS package: npm install tailwindcss@latest
  2. Replace bg-gradient-to-* with bg-linear-to-*
  3. Replace opacity utilities with color opacity syntax (/50)
  4. Move config from tailwind.config.js to CSS @theme block
  5. Update CDN script to @tailwindcss/browser
  6. Test dark mode — the dark: prefix works the same way
  7. Run your build and fix any remaining class name warnings

💡 Pro tip: The Tailwind CSS team provides an automatic migration tool. Run npx @tailwindcss/upgrade to handle most of the class name changes automatically.

The migration is straightforward for most projects. The biggest change is the config format — moving from JavaScript to CSS. The new engine is noticeably faster, especially on large projects.

Browse 1,761 free Tailwind CSS blocks

Production-ready UI sections for your next project. Free forever, open source.