Problem: Cards that rise on hover.
Solution#
<div class="hover-lift p-6 rounded-xl border bg-white">…</div>
<!-- or manually: -->
<div class="transition hover:-translate-y-1 hover:shadow-lg">…</div>Why this works#
-translate-y + shadow increase reads as elevation.
Variants#
- Responsive: add screen prefixes to the core classes
- Dark: pair each color utility with its dark: twin
- Animated: add
transition+ a state variant for motion
Related recipes#
cookbook/index|Cookbook index · utilities/index|Utilities reference · patterns/index|Layout patterns
