Skip to content

No.202 · CTAs

Tideline CTA

A closing section where a tide rises to the real share of seats taken as it scrolls into view; the words invert exactly along the wave and the button floats on the waterline like a buoy.

The prompt

Written for the variant you picked above: Night

Build a full-width closing section (min 36rem tall) for an event that's 73% full. Register --p (number) and --x (length) with @property. Measure the section's height into --h with a ResizeObserver; the surface sits at --top = (1 − p) × h. When 35% of the section is visible (IntersectionObserver, once), set --p to the real share and let it rise over 2.4s with a little overshoot. Render the content twice in identical layouts: a dry layer, and a 'water' layer whose colour variables are inverted. Mask the water with a seamless wave image (240px period, repeat-x, 16px tall) at (--x, --top − 16px) plus a solid block from --top to the bottom; roll --x 0 → 240px every 4.5s. A paler second swell rolls the other way just behind. Because the inverted copy is inside the mask, the oversized headline (clamp 2.5–6rem) inverts exactly along the wave. Pin a mono '73% of seats taken' just above the surface on the left, and the primary link on the surface on the right like a buoy (top: --top, margin-top −1.9rem), bobbing 5px with ±1° over 3.6s; hover pauses the bob and nudges the arrow. Under reduced motion the tide shows at its level, still. Selected variant — Night: theme="night": a dark section; the water is pale aqua with dark ink.

Notes

Interaction
Scroll it into view and the tide rises to how full the event is. The buoy is the link.
Motion
Tide rises over 2.4s with overshoot; surface rolls every 4.5s; buoy bobs every 3.6s.
Accessibility
Real heading, text and link, read once; the water copy is aria-hidden and inert. The fullness is stated in plain text, not only shown. Reduced motion shows the final level with no movement.
Responsive
The mask uses the measured height, so the line is right at any size; the headline balances and the buoy stays on the line at the right edge.
On touch
Same on touch; the buoy is an ordinary link.

Featured

301 components