Try 'magnetic button'
View code

Number 31: Footer wordmark rise

Specification

Catalogue
No. 31 of 110
Section
Navigation
Interaction
Scroll
Preview
Live component
Imports
react 19.3.1
Added

Notes

The closing wordmark rises letter by letter once most of the footer is in view. Each letter sits in its own clipped box and moves up from translateY(100%) with a 35ms stagger.

The observer uses a threshold of 0.6, so the rise starts when the footer is mostly visible rather than at its first pixel. Scrolling back up lowers the letters again, ready for the next visit.

The full word is in the page as hidden text, so it reads as one word rather than ten letters.

Code

React and plain CSS
"use client";

import { useEffect, useRef, useState, type CSSProperties } from "react";
import type { LivePreviewProps } from "@/components/live/types";
import styles from "./footer-wordmark.module.css";

const WORD = "Northfield";
const COLUMNS = [
  { heading: "Studio", links: ["About", "Process", "Careers"] },
  { heading: "Work", links: ["Selected", "Archive"] },
  { heading: "Contact", links: ["Email", "Newsletter"] },
];

export default function FooterWordmark({ active, context }: LivePreviewProps) {
  const scrollRef = useRef<HTMLDivElement>(null);
  const footerRef = useRef<HTMLElement>(null);
  const [shown, setShown] = useState(false);
  const demo = active && context === "card";

  // Letters rise once most of the footer is inside the frame.
  useEffect(() => {
    const root = scrollRef.current;
    const footer = footerRef.current;
    if (!root || !footer) return;
    const observer = new IntersectionObserver(([record]) => setShown(Boolean(record?.isIntersecting)), { root, threshold: 0.6 });
    observer.observe(footer);
    return () => observer.disconnect();
  }, []);

  // Card demo: scroll down to the footer, wait, scroll back up.
  useEffect(() => {
    const root = scrollRef.current;
    if (!root) return;
    if (!demo) {
      root.scrollTo({ top: 0 });
      return;
    }
    let down = true;
    let id = window.setTimeout(function swap() {
      root.scrollTo({ top: down ? root.scrollHeight : 0, behavior: "smooth" });
      down = !down;
      id = window.setTimeout(swap, down ? 1400 : 2200);
    }, 250);
    return () => window.clearTimeout(id);
  }, [demo]);

  return (
    <div
      ref={scrollRef}
      className={styles.frame}
      role="region"
      tabIndex={context === "card" ? -1 : 0}
      aria-label="Page with footer, scroll to the end"
    >
      <div className={styles.page} aria-hidden="true">
        <span className={styles.block} />
        <span className={styles.lineWide} />
        <span className={styles.line} />
        <span className={styles.line} />
      </div>
      <footer ref={footerRef} className={styles.footer} data-shown={shown || undefined}>
        <div className={styles.columns}>
          {COLUMNS.map((col) => (
            <div key={col.heading}>
              <p className={styles.heading}>{col.heading}</p>
              <ul className={styles.links}>
                {col.links.map((link) => (
                  <li key={link}>{link}</li>
                ))}
              </ul>
            </div>
          ))}
        </div>
        <p className={styles.word}>
          <span className="visually-hidden">{WORD}</span>
          {WORD.split("").map((letter, i) => (
            <span key={i} className={styles.letterMask} aria-hidden="true">
              <span className={styles.letter} style={{ "--i": i } as CSSProperties}>
                {letter}
              </span>
            </span>
          ))}
        </p>
      </footer>
    </div>
  );
}

More like this

A strip of five coloured project frames sliding left, with the image in each frame moving more slowly than its frame.

Gallery strip with parallax frames

ScrollMedia and galleries

Statement that reads with the scroll

Scroll, Text AnimationText and code

Dotted orb that thinks

Loading, AutoplayLoading and progress

Sphere of dots that parts for the pointer

Hover, PressPage sections

Sign-up that hands over the next issue

Type, FeedbackForms and inputs

Liquid metal ring

Hover, PressButtons and toggles