April 8, 2026/Simple/Heroes

Header Text Line Reveal

Header text lines slide up from below overflow-hidden parent containers on mount. Each line is clipped by its outer container and animates in with a slight stagger using GSAP.

Crafting digital
experiences that
move people.

No-5 Studio — motion-forward web design for ambitious brands.

"use client";

import { useEffect, useRef } from "react";
import gsap from "gsap";
import styles from "./styles.module.css";

export default function HeaderTextLineReveal({ lines = [], subtitle = "" }) {
  const containerRef = useRef(null);

  useEffect(() => {
    const el = containerRef.current;
    if (!el) return;

    const lineEls = el.querySelectorAll(`.${styles.lineInner}`);

    gsap.from(lineEls, {
      yPercent: 110,
      duration: 1,
      stagger: 0.08,
      ease: "power3.out",
      delay: 0.1,
    });
  }, []);

  return (
    <header ref={containerRef} className={styles.header}>
      <div className={styles.lines}>
        {lines.map((line, i) => (
          <div key={i} className={styles.lineOuter}>
            <span className={styles.lineInner}>{line}</span>
          </div>
        ))}
      </div>
      {subtitle && <p className={styles.subtitle}>{subtitle}</p>}
    </header>
  );
}
  • gsap

Related Components

NEWTODAY
BeNorth Exo Ape Hero Comboheroes
1W AGO
BeNorth Sticker Heroheroes
1MO AGO
Intro Sectionheroes