Skip to content
animorio
IT
Back to the library

Focus-in headline

TextGSAP, CSS onlyMediumCompressed weight: Demo 6.0 KBGSAP 28 KBFreeDownload the zip

The hero of a team workspace app, on white: the release notes pill, then the big headline arriving word by word from blurred to sharp, rising a few pixels on a short spring, the last word crossed once by a soft gradient, the subtitle, the two buttons and the row of customer logos. The words near the pointer lift slightly.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Focus-in headline" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The headline that comes into focus word by word</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the hero of a made-up workspace app: the announcement pill, then the headline coming into focus word by word,
         the keyword with a soft gradient running once, the subtitle, the two buttons and the row of customer logos -->
    <section class="hero" data-hero aria-label="Corvel">
      <a class="pill" href="#" data-pill>
        <span class="pill__tag">New</span>
        <span class="pill__text">Release notes</span>
        <svg class="pill__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M5.5 3.5 10 8l-4.5 4.5"></path></svg>
      </a>

      <h1 class="title" data-title></h1>

      <p class="sub" data-sub>Corvel turns scattered docs, tasks and threads into one calm workspace your whole team can read.</p>

      <div class="actions" data-actions>
        <a class="btn btn--primary" href="#" data-btn>
          <span class="btn__shine" aria-hidden="true"></span>
          <span class="btn__label">Start for free</span>
          <svg class="btn__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4"></path></svg>
        </a>
        <a class="btn btn--ghost" href="#" data-btn>
          <span class="btn__label">Book a demo</span>
        </a>
      </div>

      <div class="logos" data-logos aria-label="Teams using Corvel">
        <p class="logos__lead">Trusted by teams at</p>
        <ul class="logos__row">
          <li class="logo"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2 18 16H2Z"></path></svg><span>Haldor</span></li>
          <li class="logo"><svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7.5"></circle><circle class="logo__hole" cx="10" cy="10" r="3"></circle></svg><span>Quillow</span></li>
          <li class="logo"><svg viewBox="0 0 20 20" aria-hidden="true"><rect x="3" y="3" width="6" height="14" rx="1.5"></rect><rect x="11" y="7" width="6" height="10" rx="1.5"></rect></svg><span>Ferrous</span></li>
          <li class="logo logo--extra"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2c4 3 6 6 6 9a6 6 0 0 1-12 0c0-3 2-6 6-9Z"></path></svg><span>Ninebark</span></li>
          <li class="logo logo--extra"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 10a7 7 0 0 1 14 0H3Z"></path><rect x="3" y="12" width="14" height="3" rx="1.5"></rect></svg><span>Lumaro</span></li>
        </ul>
      </div>
    </section>

    <!-- the pointer of the preview, drawn: it glides along the headline and rests on the first button -->
    <svg class="cursore" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19 12l-6.3 1.4L9.6 19.6Z"></path></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

25 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Focus-in headline” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a white background, with a barely visible violet and blue glow behind the middle, sits the opening of the page of Corvel, a made-up app that brings together a team’s docs, tasks and threads. First the release pill comes in, New in black and Release notes in grey with a thin arrow, rising a few pixels as it comes into focus. Then the big headline, Every project, finally in focus, on two lines: each word arrives from blurred to sharp and from fourteen pixels lower, nine hundredths of a second after the one before, going one pixel above its place before settling, as on a short spring. When the last word, focus, is sharp, a gradient from violet to blue crosses it once from right to left and leaves it black again. Meanwhile the grey subtitle comes into focus, the two buttons come in, a black Start for free with its arrow and a white Book a demo with its border, and a sheen runs over the first; below, the row of logos of five made-up customers in grey. A drawn pointer runs along the headline and the words near it lift a few pixels as it passes, then it rests on the black button, which lifts a pixel with its arrow moving forward, and presses it. After a few seconds everything goes blurred again, from the last word to the first, and it starts over. With a real mouse the words lift the same way.

How it works

Two spans per word

The headline is written by the script: every line is a span, every word has an outer span, which does the entrance (opacity, blur, rise), and an inner one, which does the lift on hover. That way the two movements do not cancel each other out: GSAP writes one transform per element.

Blurred, then sharp, on a short spring

Each word starts with a 12 pixel blur filter and 14 pixels lower. Blur and opacity go to zero in 0.75 seconds with power2.out; the rise uses GSAP keyframes, 14, minus 1.2, 0.3 and 0, in 0.85 seconds with power3.out: that one pixel too far is what makes the word look as if it landed on a spring. Between one word and the next, 0.09 seconds.

The gradient on the keyword

The last word has a linear-gradient three times its width, black at the sides and violet and blue in the middle, clipped to the text with background-clip. Moving background-position from 100% to 0% sweeps the colour across it just once and leaves it black again.

The words near the pointer

On every move the distance from the pointer to the centre of each word is measured, divided by its width and height, and the word lifts by HOVER_LIFT pixels times the square of the closeness, with a 0.45 second quickTo and back.out(2.2). The drawn pointer of the preview uses the same function, but steps aside as soon as a real pointer moves.

The exit and the loop

After HOLD seconds everything leaves in reverse: the logos, the buttons, the subtitle and the words from last to first, rising six pixels as they blur; then half a second of nothing and the timeline starts again. The drawn pointer’s positions are measured on the page at every stop, so they hold even if the size changes halfway.

Values to change

NameFileDefaultWhat it changes
HEADLINEscript.js'Every project,|finally in focus.'The headline; the vertical bar breaks the line, the last word gets the gradient.
BLURscript.js12How blurred the words are as they arrive, in pixels.
RISEscript.js14How many pixels lower the words rise from.
WORD_STAGGERscript.js0.09The seconds between one word and the next.
HOVER_LIFTscript.js5How many pixels the words near the pointer lift.
HOLDscript.js3.4The seconds the hero stays in focus before starting over.
ACCENTscript.js'#4f46e5'The first colour of the gradient on the keyword.
ACCENT_TWOscript.js'#0ea5e9'The second colour of the gradient.

Try them in the Playground

When to use it

For the opening of the landing page of a piece of software, an app or a studio: the headline coming into focus says the most important sentence at once and lets it be read one word at a time, without noisy effects. It also suits the header of a pricing page, an announcement or a waitlist.

On phones

The same animation with adapted sizes: the headline is measured on the width and height of the screen and stays on two lines, the buttons get smaller and the first three of the five logos remain. A finger on the headline lifts the words like hovering with a mouse.

With reduced motion

No rise, no blur and no drawn pointer: the pill, the words, the subtitle, the buttons and the logos fade in in the same order and stay.

Pitfalls

  • The blur filter goes on the outer span and the gradient on the inner one: with background-clip and transform on the same element of a moving word, some browsers lose the clipping for a frame.
  • The rise and the hover lift are two transforms: if they sat on the same span, the lift’s quickTo would cancel the rise halfway.
  • The drawn pointer reads its positions with getBoundingClientRect at the start of every stop, not once: the demo window changes size while it is watched.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP 28 KB.

Testing

Tested on 25 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations