- Services
- Case Studies
- Technologies
- NextJs development
- Flutter development
- NodeJs development
- ReactJs development
- About
- Contact
- Tools
- Blogs
- FAQ
TailwindCSS Shortcuts You Didn't Know About
Learn about @apply directives, custom variants, and JIT mode techniques.

TailwindCSS Shortcuts You Didn’t Know About
Ever felt like you’re typing the same Tailwind classes over and over? You’re not alone! Today, I’m sharing some incredible TailwindCSS shortcuts that have completely transformed my development workflow. These aren’t your everyday tricks – they’re the hidden gems that will make you go “How did I not know this before?“
1. The Magic of @apply Directives
Let’s be honest – nobody enjoys typing flex items-center justify-between
for the hundredth time. Here’s where @apply comes to the rescue:
@layer components { .flex-between { @apply flex items-center justify-between; }}
2. Custom Variants: Your New Best Friend
Did you know you can create your own variants? Here’s a game-changer for those specific states you frequently style:
@layer utilities { @variants group-focus, hover { .text-shadow { text-shadow: 2px 2px 4px rgba(0,0,0,0.2); } }}
3. Quick Responsive Design with Arbitrary Values
Here’s something that blew my mind – you can use arbitrary values with breakpoints inline:
<div class="md:w-[32.33%] lg:w-[24.25%]"> <!-- Your content --></div>
4. The Power of Custom Properties
Want to make your designs more dynamic? Combine Tailwind with CSS custom properties:
<div class="bg-[var(--brand-color)]" style="--brand-color: #234567;"> <!-- Dynamic content --></div>
5. JIT Mode Shortcuts
With Just-In-Time mode, you can create ultra-specific utilities on the fly:
<button class="grid-cols-[1fr,auto,1fr]"> <!-- Perfect for complex layouts --></button>
Conclusion
These shortcuts aren’t just about writing less code – they’re about writing smarter code. Incorporate these into your workflow, and you’ll find yourself building faster and more efficiently than ever before.






Talk with CEO
We'll be right here with you every step of the way.
We'll be here, prepared to commence this promising collaboration.
Whether you're curious about features, warranties, or shopping policies, we provide comprehensive answers to assist you.