TailwindCSS v3 released! A look at the new features 🎨
Tailwind CSS v3.0 just got released and they have added a lot of cool features, so let’s have a look at them.
JIT is now inbuilt
The JIT mode is now inbuilt in TailwindCSS so it is way faster now and also enables some cool new features like stackable variants, arbitrary value support.
Lot’s of new colors
There are many new colors now and they are 22 in total!
There are also 5 different gray’s now! 🤯
Colored box-shadow was an important feature that wasn’t in tailwind until v3. But it is finally here and so easy to use :D
<button class="shadow-lg shadow-green-500 text-center bg-green-500 text-white px-8 py-3 rounded-full text-xl">Button</button>
A few classes can you give you this beautiful button-
Now you don’t have to use any plugins to use the aspect class, you can use the various types provided like-
aspect-square, or use custom values like
aspect-[9/6] as JIT is now inbuilt.
This is a great feature that allows you to have a list of scrollable elements which snap to center, start, or end. In this demo, I am using center snap-
This will give a nice snap scrolling effect like this
You can now add smooth scrolling in tailwind CSS by adding the
scroll-smooth class. If you want to add margin to some places for scroll, it can be done by prefixing scroll, like-
Tailwind now supports multi-column/newspaper-like layouts! You can give a specific number of columns you need or just set it to auto for the browser to decide how many columns to use based on size.
Accent color & file upload
You can now customize your forms to match the theme of your brand and it will change the colors of things like checkboxes and radio buttons.
You can achieve this by just adding the
accent-<color>-<shade> to the div/form tag.
File upload button
You can also customize the file upload buttons to look beautiful like this-
You can add styles as you do normally but prefix
file:. To get the same button as I did you can use this-
You can now change the color, thickness, and style of your underlines as well!
To use these styles you need to use
decoration-red-600 decoration-wavy so the styles will look like this-
<input type="file" class="file:bg-emerald-200 file:px-4 file:py-2 file:rounded-full file:border-none file:text-emerald-900 file:text-lg file:font-semibold"/>
The team at TailwindCSS has also released some more cool stuff, I just highlighted the things that I found the most exciting. To know more about Tailwind you can check out their website 😉. See ya next time ✌️