How it works
This card hover effect makes a card rise toward the user: it moves up, its shadow grows deeper and softer, and the 1px border picks up your accent color. Three small changes together read as "this is clickable" far better than any one of them alone.
On hover the card transitions transform to translateY(-Lift px), box-shadow from a tight 0 2px 6px to an offset of 2.5 times Lift with a blur of 5 times Lift at 45% black, and border-color from 8% white to Border color. Tying the shadow to Lift keeps the illusion consistent: a card that rises further casts a bigger, blurrier shadow.
Use it on pricing cards, feature tiles, dashboard widgets and any grid where the whole card is a link. Parameters: Width, Lift, Border color, Card color, Corner radius, Duration and Easing. Lift of 4 to 8px suits dense grids; 12px or more works on a few large cards with space around them. The default quart-out easing at 0.35s gives a responsive rise.
The transform part runs on the compositor, but transitioning box-shadow repaints a large blurred area on every frame. If you have a grid of 30 cards, a cheaper approach is to put the large shadow on a pseudo-element and transition only its opacity. Also apply the same styles on :focus-within so keyboard users who tab to the card's link see the lift.
How do I make the whole card clickable?
Put a link around the title and stretch it with a pseudo-element: give the card position: relative and the link's ::after position absolute with inset 0. The whole card becomes a click target while the markup stays a single link. Add :focus-within to the hover selector so focusing the link lifts the card too.
Why does the shadow grow with the lift value?
A real object that moves away from a surface casts a larger, softer shadow. The preset derives the hover shadow offset (2.5 times Lift) and blur (5 times Lift) from the same parameter, so changing Lift always gives a matching shadow. If you set the shadow by hand, keep that ratio or the card looks like it floats oddly.
Can I turn off the lift on touch devices?
Wrap the hover rules in @media (hover: hover) so they only apply on devices with a real pointer. On phones a tap would otherwise trigger the hover state and leave the card lifted until the user taps elsewhere. The Tailwind output can use the same media query through a custom variant.