File: just-in-time-the-next-generation-of-tailwind-css.md | Updated: 11/15/2025
âKCtrl KDocs Blog Showcase Sponsor Plus
March 15, 2021

Adam Wathan
Update: As of Tailwind CSS v2.1, the new Just-in-Time engine is included right in Tailwind CSS itself, so you don't need the @tailwindcss/jit package anymore. Learn more in the documentation
.
One of the hardest constraints we've had to deal with as we've improved Tailwind CSS over the years is the generated file size in development. With enough customizations to your config file, the generated CSS can reach 10mb or more, and there's only so much CSS that build tools and even the browser itself will comfortably tolerate.
For that reason, you've always had to be careful about expensive changes to your config file like adding too many extra breakpoints or enabling extra variants like disabled or focus-visible.
Today I'm super excited to share a new project we've been working on that makes these considerations a thing of the past: a just-in-time compiler for Tailwind CSS .
@tailwindcss/jit is a new experimental library that compiles all of your CSS on-demand as you author your template files, instead of generating your entire stylesheet up front.
This comes with a lot of advantages:
focus-visible, active, disabled, and others are not normally enabled by default due to file-size considerations. Since this library generates styles on demand, you can use any variant you want, whenever you want. You can even stack them like sm:hover:active:disabled:opacity-75. Never configure your variants again.top: -113px for a quirky background image? Since styles are generated on demand, you can just generate a utility for this as needed using square bracket notation like top-[-113px]. Works with variants too, like md:top-[-113px].Try it today by installing @tailwindcss/jit and swapping it into your PostCSS configuration:
npm install -D @tailwindcss/jit tailwindcss postcss autoprefixer
// postcss.config.jsmodule.exports = { plugins: { "@tailwindcss/jit": {}, autoprefixer: {}, },};
We're shipping it as a separate library for now, but once we've worked out all the kinks we're going to roll it right back into tailwindcss behind a configuration option, and we're aiming to make it the default in Tailwind CSS v3.0 later this year.
Learn more about the project on GitHub , then install it, play with it, bend it, break it, and let us know what you think!
Ready to try it out? Get started â
Subscribe
Copyright © 2025 Tailwind Labs Inc.·Trademark Policy