Skip to content
motionprompts motionprompts

Wordmark Fill Footer

GSAP animation component · Published 2026-11-21 · by vanguardia.dev

Open live demo ↗ Raw prompt (.md)

What it does

Footer with a giant outline word whose fill sweeps from left to right as the page reaches the bottom: a hard-edged gradient clipped to the text (background-clip: text) has its cut stored in a CSS variable that GSAP scrubs from 0% to 100%, ending exactly at the end of the document.

How it's built

Categoryfooter
Techgsap
GSAP pluginsScrollTrigger
Complexitysection
Performance costlight
Mobile-safeyes

footer wordmark outline text-stroke background-clip fill scrub scrolltrigger

Rebuild it with AI

To reproduce this animation in your own project, copy the prompt below into Claude Code, Cursor or any AI coding agent. The prompt is validated, it describes the exact structure, timing and easing, so the agent rebuilds the effect faithfully and you can then adapt colors, copy and layout to your design.

The full prompt

Wordmark Fill Footer: Giant Outline Word Filled Left to Right by Scroll With background-clip:text

Goal

Build a black page that ends in a footer with one giant word drawn in outline (transparent fill, faint 1px stroke). As the page reaches the bottom, the word fills with solid colour from left to right, tied to scroll: the fill is a hard-edged gradient clipped to the text (background-clip: text) whose cut position lives in a CSS variable that GSAP scrubs from 0% to 100%. The fill starts when the word peeks in from the bottom of the viewport and completes exactly when the document cannot scroll any further. Above the footer there is only an empty block, so there is something to scroll. GSAP + ScrollTrigger, native scroll.

Tech

Vanilla HTML/CSS/JS with ES module imports. gsap (npm) + ScrollTrigger. Font: Funnel Display weight 600.

Layout / HTML

<div class="wf">
  <div class="wf-spacer" aria-hidden="true"></div>
  <footer class="wf-footer">
    <p class="wf-word" aria-hidden="true">hello</p>
  </footer>
</div>

Styling

:root: --wf-bg:#050608, --wf-fill:#ffffff, --wf-stroke:rgba(255,255,255,.22). Register the cut so it can be animated as a real percentage:

@property --wf-p { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
  • .wf: background:var(--wf-bg); font-family:"Funnel Display".
  • .wf-spacer: height:110svh (placeholder for the page above).
  • .wf-footer: padding:0 clamp(1.25rem,3vw,2.5rem) clamp(1.5rem,3vw,2.5rem); overflow:hidden.
  • .wf-word:
  • width:fit-content; margin:0 0 0 -.04em; font-weight:600; font-size:clamp(6rem,32vw,30rem); line-height:.8; letter-spacing:-.06em; padding-bottom:.06em. fit-content matters: the gradient spans the element's box, so a full-width block would finish filling the word long before 100%.
  • color:transparent; -webkit-text-stroke:1px var(--wf-stroke).
  • --wf-p:0%; background-image:linear-gradient(90deg, var(--wf-fill) var(--wf-p), transparent var(--wf-p)); -webkit-background-clip:text; background-clip:text. Two stops at the same position give a hard edge instead of a blur.

GSAP effect (be exact)

gsap.registerPlugin(ScrollTrigger). Build in mount(config) → destroy().

const DEFAULTS = { scrub: 0 }; // 0 = locked to scroll (scrub: true); > 0 = seconds of smoothing

gsap.fromTo(word, { "--wf-p": "0%" }, {
  "--wf-p": "100%", ease: "none",
  scrollTrigger: { trigger: word, start: "top bottom", endTrigger: footer, end: "bottom bottom", scrub: true },
});

The end is measured on the footer, not on the word: the footer has bottom padding, so the word's own bottom never reaches the viewport's bottom and the fill would stop short of 100%.

destroy(): kill the tween and its ScrollTrigger, remove the inline --wf-p.

Assets / images

None.

Behavior notes

  • Animating only the variable keeps the colour in CSS: change --wf-fill and the fill follows, no JS involved.
  • The stroke stays visible over the filled part, which keeps the letter edges crisp; set --wf-stroke to the fill colour if you want a seamless fill.
  • If the footer has more content under the word (links, legal line), keep endTrigger on the footer so the fill still completes at the very end of the page.
  • Only the prefixed variables are global.

Using this outside its demo page

This component is written as a complete page: that is how the demo is meant to look. If you are dropping it into an existing project, or combining it with other components, these are the things it declares at document level and that you need to move or reconcile first.

  • Palette on :root: --wf-bg, --wf-fill, --wf-stroke. Generic names like --ink, --paper or --muted are defined by many components in this catalogue with different values, and they will also collide with whatever your own project defines. Move them onto the component's wrapper (.my-section { --ink: … }) or keep the prefix.
  • **Rules on *, *::before, *::after, html, body**: the demo owns the whole document, so these set the box model and resets. Dropped into an existing project they restyle the entire page, not just this section. Re-target them at the component's wrapper before using it.
  • @property --wf-p: a document-level registration. It is harmless elsewhere, but register it once if you use several copies.

New components in your inbox

One email a week, only when new components ship, each with its live demo and prompt.