Skip to content
animorio
IT
Back to the library

Developer hero

Text, HoverGSAPMediumCompressed weight: Demo 6.8 KBGSAP 28 KBFreeDownload the zip

The opening of a made-up developer’s portfolio, Noor Haddad: the headline starts as code in a small editor, typed in bursts piece by piece with a caret that thins and a highlighted line that moves down. Then it compiles: the tags pull back and fade, the words fly to their places and land wide before settling, the word in <em> becomes the accent italic, and the subtitle, the two buttons and the «Available for work» label arrive. Hover a word and the piece of code that makes it so rises above it. Then back to the code. Minimal style, a single accent.

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>
<!--
  "Developer hero" 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>Developer hero</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth-italic.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- The opening of a made-up developer's portfolio, Noor Haddad. The headline is first written as code in a small
       editor; then it "compiles": the tags and quotes pull back and fade, the words fly to their places and widen into
       the real headline, the word in <em> becomes the accent italic, and the subtitle and buttons arrive. Hover a word
       of the headline and the piece of code that makes it so rises above it. Then it goes back to the code. -->
  <main class="stage">
    <div class="scene" data-scene>

      <section class="editor" data-editor aria-hidden="true">
        <header class="editor__bar">
          <span class="tab">
            <svg class="tab__icon" viewBox="0 0 16 16"><path d="M4 1.75h5.2L12.5 5v9.25H4z"/><path d="M9 1.9V5.2h3.3"/></svg>
            hero.html
          </span>
          <span class="editor__lang">HTML</span>
        </header>
        <div class="lines" data-lines>
          <span class="band" data-band></span>
          <span class="caret" data-caret></span>
          <div class="line"><span class="ln">1</span><span class="code"><span class="t tag">&lt;style&gt;</span><span class="t prop">em { color: </span><span class="t acc">blue</span><span class="t prop"> }</span><span class="t tag">&lt;/style&gt;</span></span></div>
          <div class="line"><span class="ln">2</span><span class="code"><span class="t tag">&lt;section</span><span class="t attr"> class=</span><span class="t str">"hero"</span><span class="t tag">&gt;</span></span></div>
          <div class="line"><span class="ln">3</span><span class="code"><span class="t sp">  </span><span class="t tag">&lt;h1&gt;</span><span class="t txt" data-w="i">I</span><span class="t sp"> </span><span class="t txt" data-w="build">build</span><span class="t sp"> </span><span class="t tag">&lt;em&gt;</span><span class="t txt acc" data-w="calm">calm</span><span class="t tag">&lt;/em&gt;</span><span class="t sp"> </span><span class="t txt" data-w="interfaces">interfaces.</span><span class="t tag">&lt;/h1&gt;</span></span></div>
          <div class="line"><span class="ln">4</span><span class="code"><span class="t sp">  </span><span class="t tag">&lt;p&gt;</span><span class="t txt" data-w="sub">Front-end engineer in Lisbon.</span><span class="t tag">&lt;/p&gt;</span></span></div>
          <div class="line"><span class="ln">5</span><span class="code"><span class="t sp">  </span><span class="t tag">&lt;a&gt;</span><span class="t txt" data-w="work">View work</span><span class="t tag">&lt;/a&gt;</span><span class="t sp"> </span><span class="t tag">&lt;a&gt;</span><span class="t txt" data-w="contact">Contact</span><span class="t tag">&lt;/a&gt;</span></span></div>
          <div class="line"><span class="ln">6</span><span class="code"><span class="t tag">&lt;/section&gt;</span></span></div>
        </div>
      </section>

      <section class="render" data-render aria-label="Noor Haddad, front-end engineer">
        <p class="badge" data-badge><span class="badge__text">Available for work</span></p>
        <h1 class="title" data-title>
          <span class="w" data-w="i" data-src="&lt;h1&gt;">I</span>
          <span class="w" data-w="build" data-src="&lt;h1&gt;">build</span>
          <em class="w w--em" data-w="calm" data-src="&lt;em&gt; color: blue">calm</em>
          <span class="w" data-w="interfaces" data-src="&lt;/h1&gt;">interfaces.</span>
        </h1>
        <span class="rule" data-rule aria-hidden="true"></span>
        <p class="sub w" data-w="sub" data-src="&lt;p&gt;">Front-end engineer in Lisbon.</p>
        <div class="actions">
          <a class="btn btn--solid" href="#work" data-btn="work">
            <span class="btn__bg" data-bg></span>
            <span class="btn__text w" data-w="work" data-src="&lt;a&gt;">View work</span>
            <svg class="btn__arrow" data-arrow viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4l4 4-4 4"/></svg>
          </a>
          <a class="btn btn--ghost" href="#contact" data-btn="contact">
            <span class="btn__bg" data-bg></span>
            <span class="btn__text w" data-w="contact" data-src="&lt;a&gt;">Contact</span>
          </a>
        </div>
        <span class="peek" data-peek aria-hidden="true"><span class="peek__text" data-peek-text></span></span>
      </section>

      <svg class="pointer" data-pointer viewBox="0 0 20 20" aria-hidden="true"><path d="M4 2.5v13.2l3.6-3.4 2.4 5.4 2.3-1-2.4-5.3 5-.3z"/></svg>
    </div>
  </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.

58 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Developer hero” 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 warm white page, a white card with the «hero.html» tab: the opening’s code types itself in bursts, one piece at a time, with a small irregular rhythm and a pause at each new line. A pale blue band follows the line being written, and the blue caret never blinks: with each piece it widens and then thins. Six lines: the style that makes the italic blue, the section, the headline, the subtitle, the two links, the closing tag. Then the code compiles: the tags and quotes pull outwards and fade in a scattered order, the card dissolves, and the words fly from the code to their places in the big headline, starting small and monospaced and landing wide, with the width axis at 110 settling to 100 with a small bounce. «calm» becomes the blue italic, a thin rule draws itself from the centre below, the subtitle and the button labels arrive from the same code, the button backgrounds swell in and the View work arrow slides in from the left; above, the «Available for work» label appears. A pointer passes over «calm» and the dark label «<em> color: blue» rises above it, then over «interfaces.» with «</h1>». After a pause everything drops away and the code comes back.

How it works

Words that exist twice

Every headline word exists twice: in the code, in a span with its data-w, and in the real opening, in an inline-block span with the same data-w. The two sit on top of each other in the same grid cell, so the opening is already laid out even while hidden.

The measured flight

Just before compiling both words are measured: the x and y offset between code and headline, and the ratio between the two font sizes. The headline word starts there, small, and returns to x 0, y 0, scale 1 with back.out: the FLIP technique, with values computed at the right moment (immediateRender off).

The width that settles

font-variation-settings reads two CSS variables, --wd and --wg. GSAP starts --wd at 110 and, as the word is nearly there, takes it to 100 with back.out: the word lands wide and narrows with a small bounce. Every word keeps the width measured at 100, so the headline never re-wraps while it settles.

The code behind the word

Every word keeps in data-src the code that makes it so. On hover the dark label takes that text, measures itself and centres above the word, rising 7 pixels with back.out; the word lifts 2 pixels. While the pointer is over it the loop pauses.

Values to change

NameFileDefaultWhat it changes
TYPE_RATEscript.js11How many pieces of code are typed per second.
FLY_TIMEscript.js1.15How many seconds the words take to fly from the code to the headline.
SPRINGscript.js1.5How far the words overshoot as they land (0 = none).
WIDE_FROMscript.js110The font width the words land at, before settling to 100.
HOLDscript.js5.8How many seconds the finished opening stays before going back to the code.
AUTOPLAYscript.jstrueA pointer hovers the words on its own until you do it yourself.
--accentstyle.css#3550f2The colour of the italic, the caret and the line band.

Try them in the Playground

When to use it

In the opening of a developer’s portfolio, on the personal page of someone who writes code, in the hero of a developer tool or a coding course; anywhere the headline can tell how it is made.

On phones

The code and the headline are sized on width and height (vw and vh, with clamp), so they fit the phone box: the code gets small but stays on one line, the headline goes to two lines and the card’s HTML label disappears. A finger taps a word to see its code.

With reduced motion

No typing, no flight, no bounce: the finished opening shows straight away, still, and the code label fades in on hover.

Pitfalls

  • The headline words must be measured with their transform cleared, just before the flight: measured while still moved by the previous loop, they start from the wrong place.
  • The flight values are functions with immediateRender off: they are computed when the flight starts, after the page has its size, not when the timeline is built.
  • The button background is a separate span: if the whole button started transparent, its label, which flies from the code, would stay invisible too.
  • The code label is measured after its text is set, and only then centred on the word.
  • The variable font really changes the width: if the words landed wide without a fixed width, the headline would wrap mid-flight and then snap back to one line. So every word keeps the width measured at 100.
  • The dark button’s label is white: flying over the paper before its background arrives, it would be invisible. It starts dark and turns white as the background swells in.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

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

Testing

Tested on 30 November 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