Layered heading on hover
A large three-colour layered heading whose layers spread apart when the card is hovered or entered with the keyboard, in pure CSS.
- Tailwind
- React
- CSS
- WordPress
Description
Behind the heading, two slightly offset coloured copies give it a screen-printed poster relief; when the card is hovered, or when keyboard focus reaches its button, the layers spread apart with a small bounce, then close up again. The real heading remains a single h2 read once: both copies are hidden from screen readers, and the foreground text keeps AA contrast in light and dark mode. Layers are stacked in the same grid cell and only their transform is animated, with no script or animated shadow; offsets are in em so they follow the heading size. Layer colours set with variables (--efts-mid, --efts-back). With prefers-reduced-motion the relief changes without motion. No overflow at 360 px thanks to a fluid size. Example: a craft brewery in Roubaix.
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