At this point, you’ve learned how to structure layouts, control spacing, apply color, and add hover animations. Now it’s time to make your UI look refined and modern.
Small visual details like rounded corners, shadows, and soft highlights can transform a basic interface into something polished and professional.
In this lesson, we’ll explore the most useful visual effect utilities in TailwindCSS.
| Utility | Purpose |
|---|---|
rounded | Control the corner radius of elements |
shadow | Add depth to elements |
ring | Add focus/outline effects |
backdrop-blur | Create glass-like blur effects |
Let’s go step-by-step.
rounded)Rounded corners are essential for modern UI design.
<div class="bg-gray-200 p-4 rounded">Small rounded corners</div><div class="bg-gray-200 p-4 rounded-lg">Large rounded corners</div><div class="bg-gray-200 p-4 rounded-full">Fully circular (badges, avatars)</div>
| Class | Look |
|---|---|
rounded-sm | Slight |
rounded | Default medium |
rounded-lg | Smooth rounded |
rounded-xl | Extra smooth |
rounded-full | Circle / pill shaped |
shadow)Shadows help create depth and elevation, making UI look layered and dynamic.
<div class="p-6 bg-white rounded shadow">Subtle shadow</div><div class="p-6 bg-white rounded shadow-md">Medium depth</div><div class="p-6 bg-white rounded shadow-lg">Large soft shadow</div>
Use light shadows for UI that feels minimal and calm.
ring)Rings are outer outlines useful for focus states — especially for inputs and buttons.
<inputclass="p-2 border rounded focus:ring-2 focus:ring-blue-400"/>
This provides clear feedback, improving accessibility and user experience.
backdrop-blur)This utility creates a frosted glass effect — perfect for modals and overlay sections.
<div class="backdrop-blur bg-white/30 p-6 rounded-lg shadow-lg">Glass effect content</div>
💎 You’ll see this style in modern UI like Apple and macOS design.
Combine everything we learned:
<div class="max-w-xs mx-auto p-6 bg-white rounded-xl shadow-md text-center"><imgsrc="https://i.pravatar.cc/100"class="w-24 h-24 rounded-full mx-auto mb-4"/><h2 class="text-xl font-bold text-gray-800 mb-1">Alex Johnson</h2><p class="text-gray-500 mb-4">Frontend Developer</p><buttonclass="px-4 py-2 bg-indigo-500 hover:bg-indigo-600 text-white rounded-lg transition duration-300">Follow</button></div>
| Utility | Impact |
|---|---|
rounded-xl + rounded-full | Smooth, modern corners |
shadow-md | Subtle depth and contrast |
text-gray-500 | Soft typography tone |
hover:bg-indigo-600 | Smooth interactive feedback |
This is a simple component that looks professional instantly.
| Utility | Purpose |
|---|---|
rounded-* | Creates smooth or circular corners |
shadow-* | Adds depth and separation |
ring-* | Visual focus / input clarity |
backdrop-blur | Soft glass UI effects |
These subtle visual enhancements dramatically improve UI quality.