Cards with a following halo
A row of cards where the hovered card lights up with a halo that follows the mouse and brightens its edge closest to the pointer.
- Tailwind
- React
- CSS
- WordPress
Description
A Saumur wine estate presents three visits as side-by-side cards. When the mouse moves over a card, a rosy halo follows the pointer inside that card only, its edge lights up where the cursor passes, the card lifts slightly and the edges of the neighbouring cards dim to guide the eye. The edge is a thin ring cut out by a CSS mask, lit by a spot of light moved with transform: no layout shift, and about thirty lines of dependency-free JavaScript, limited to one update per frame, only set two CSS variables. With touch, pen, no JavaScript or prefers-reduced-motion, nothing moves: each card keeps a fixed glint on its top corner, just as polished. With the keyboard, the card holding focus lights up and its link shows a clear focus outline. The decoration is hidden from screen readers, text keeps AA contrast in light and dark themes, with no horizontal scrolling from 360 px. Three looks are ready through the data-ehs-style attribute (net, doux, relief), and colours, radius or halo size are set through CSS variables prefixed ehs.
Code
Loading the code…
The code of this component in
Reviews
No reviews yet.
In the same spirit

A large heading whose words turn from grey to ink as the page scrolls, then whose key phrases get a marker stroke, in pure CSS with a readable fallback.
- Tailwind
- React
- CSS
- WordPress

Cards that fade in as they enter the screen, one after another in each row, without a line of JavaScript and with a static fallback.
- Tailwind
- React
- CSS
- WordPress

A translucent card with a saturated blur whose sharper edge refracts the colourful shapes drifting behind it, with an opaque fallback when transparency is reduced.
- Tailwind
- React
- CSS
- WordPress

A help block shaped like a conversation: bubbles, three animated typing dots and clickable quick replies that show your answers to frequent questions, frozen under prefers-reduced-motion.
- Tailwind
- React
- CSS
- WordPress