Skip to content

No.361 · 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

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

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 (night): theme="night": a dark section; the water is pale aqua with dark ink. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. 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 behavior: 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. Touch: Same on touch; the buoy is an ordinary link. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

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.