DEV Community

Cover image for ๐Ÿงต 3 Tailwind Classes I Use in Every Single Project (and why you should too)
Dus Mamud
Dus Mamud

Posted on

๐Ÿงต 3 Tailwind Classes I Use in Every Single Project (and why you should too)

As a frontend dev, consistency and speed matter. Thatโ€™s why Tailwind CSS is my go-to utility-first framework โ€” it's fast, scalable, and doesnโ€™t get in your way.

No matter the project โ€” be it a landing page, dashboard, or portfolio โ€” there are 3 Tailwind classes that I always end up using:

๐Ÿ”น 1. flex

If you're building layouts (which... we all are), flex is a must-have. Combine it with:

  • justify-center
  • items-center
  • gap-x-4

...and suddenly your layout becomes chefโ€™s kiss ๐Ÿ’…
Great for navbars, buttons, and aligning components vertically or horizontally with minimal effort.

๐Ÿ”น 2. rounded-xl

Corners matter more than people admit. rounded-xl gives your UI that smooth, modern edge that users subconsciously love. I use this on:

  • Cards
  • Buttons
  • Modals
  • Image containers

It instantly levels up the visual aesthetic without touching custom CSS.

๐Ÿ”น 3. text-gray-600

Typography is design. text-gray-600 is the perfect neutral color for body text โ€” easy to read, subtle enough not to overpower headers.
Pair it with text-sm or leading-relaxed, and your content will be 10x more readable.

๐Ÿ“Œ Bonus Utility Combos:

  • p-4 for padding consistency
  • gap-4 or space-y-4 for spacing between elements
  • transition-all duration-200 for subtle UI animations

๐Ÿ“š Want more Tailwind goodness?

Hereโ€™s the ultimate cheatsheet to keep on hand:
๐Ÿ‘‰ tailwindcomponents.com/cheatsheet

These small building blocks help me ship faster and cleaner โ€” whether Iโ€™m working solo or collaborating with a team.

What are your favorite Tailwind utilities?
Drop them below or letโ€™s connect and share ideas ๐Ÿ‘‡

Top comments (1)

Collapse
 
roman_84245e13a62bea35443 profile image
Roman

Thanks for sharing ๐Ÿ˜Š