Layered snowfall
Three layers of snowflakes fall at different speeds, pushed by an adjustable wind, while snow piles up at the bottom of the block, in pure CSS.
- Tailwind
- React
- CSS
- WordPress
Description
A snowfall with depth for your holiday pages: twenty-one flakes spread over three planes, small and slow in the distance, larger and faster in the foreground, for a real parallax effect. A wind setting (Calm, Breeze, Gust) tilts the fall, more strongly on the nearest flakes, and a snowdrift slowly builds up at the foot of the section. The sky shifts from blue to lilac with a golden shop-window glow: a colourful backdrop for a chocolate maker, a gift shop, a Christmas market or a mountain resort. The text sits on a semi-opaque card, with AA contrast in light and dark mode. Everything is set with variables: --efnp-wind for the default wind strength, --efnp-flake and --efnp-snow for the snow, --efnp-top, --efnp-bottom and --efnp-glow for the sky, and the speed of each layer. Only transform and opacity are animated, with no image or script, and the decoration is hidden from screen readers. The wind is chosen with real radio buttons and a checkbox pauses the animation (WCAG 2.2.2), all from the keyboard. No horizontal scrolling from 360 px. With prefers-reduced-motion the flakes stay still at different heights and the snowdrift is already formed.
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