Skip to content
animorio
IT
Back to the library

Typo 404 page

Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 9.2 KBGSAP 28 KBFreeDownload the zip

The 404 page of a made-up coat shop, Halden Outerwear: in the address bar the wrong path, /colections/winter-coats, with a thin red wavy line under the misspelt part; in the middle a big 404 in a variable typeface that settles on a spring, the line «This page took a wrong turn.», three suggestion pills and the search field with its caret blinking. Over a suggestion the pill lights up and the address rewrites itself letter by letter into the right one, while the wavy line straightens out and fades; a click passes the page to a preview of the right page, then it comes back. Minimal style.

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>
<!--
  "Typo 404 page" 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>Page not found, Halden Outerwear</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
  <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/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the 404 page of a made-up coat shop, Halden Outerwear. The address bar shows the mistyped path with a wavy line
       under the wrong segment; the big 404 settles on a spring; under it, the pages you probably meant. Over one of
       them the address rewrites itself letter by letter into the right path and the wavy line straightens out and
       goes; a click opens a small preview of that page, then comes back -->
  <main class="pagina" data-pagina>
    <div class="barra" data-barra>
      <svg class="barra__lucchetto" viewBox="0 0 16 16" aria-hidden="true"><rect x="3.5" y="7" width="9" height="6.5" rx="1.6"/><path d="M5.6 7V5.4a2.4 2.4 0 0 1 4.8 0V7"/></svg>
      <p class="barra__indirizzo" aria-live="polite"><span class="barra__dominio">halden.co</span><span class="barra__via" data-via>/colections/winter-coats</span></p>
      <svg class="onda" data-onda aria-hidden="true"><path data-onda-linea pathLength="1"/></svg>
      <span class="barra__caret" data-caret-barra aria-hidden="true"></span>
      <svg class="barra__ricarica" viewBox="0 0 16 16" aria-hidden="true"><path d="M12.6 8a4.6 4.6 0 1 1-1.4-3.3"/><path d="M11.6 2.4v2.6H9"/></svg>
    </div>

    <div class="scena" data-scena>
      <section class="errore" data-errore aria-labelledby="titolo">
        <h1 class="numero" id="titolo" aria-label="404, page not found" data-numero>
          <span class="cifra" data-cifra aria-hidden="true">4</span><span class="cifra" data-cifra aria-hidden="true">0</span><span class="cifra" data-cifra aria-hidden="true">4</span>
        </h1>
        <p class="frase" data-frase>This page took a wrong turn.</p>

        <div class="consigli" data-blocco>
          <p class="etichetta">Did you mean</p>
          <div class="consigli__fila">
            <button class="consiglio" type="button" data-consiglio data-meta="/collections/winter-coats" data-pagina-giusta="cappotti">
              <span class="consiglio__fondo" aria-hidden="true"></span>
              <span class="consiglio__testo">/collections/winter-coats</span>
              <svg class="consiglio__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.6"/><path d="M8.6 4.4 12.2 8l-3.6 3.6"/></svg>
            </button>
            <button class="consiglio" type="button" data-consiglio data-meta="/collections" data-pagina-giusta="collezioni">
              <span class="consiglio__fondo" aria-hidden="true"></span>
              <span class="consiglio__testo">/collections</span>
              <svg class="consiglio__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.6"/><path d="M8.6 4.4 12.2 8l-3.6 3.6"/></svg>
            </button>
            <button class="consiglio" type="button" data-consiglio data-meta="/journal" data-pagina-giusta="giornale">
              <span class="consiglio__fondo" aria-hidden="true"></span>
              <span class="consiglio__testo">/journal</span>
              <svg class="consiglio__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.6"/><path d="M8.6 4.4 12.2 8l-3.6 3.6"/></svg>
            </button>
          </div>
        </div>

        <label class="cerca" data-blocco data-cerca-campo>
          <svg class="cerca__lente" viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.4"/><path d="m10.3 10.3 3.2 3.2"/></svg>
          <span class="solo-lettore">Search the shop</span>
          <input class="cerca__input" type="text" autocomplete="off" spellcheck="false" data-cerca>
          <span class="cerca__vista" aria-hidden="true"><span class="cerca__scritto" data-scritto></span><span class="cerca__caret" data-caret></span><span class="cerca__segnaposto" data-segnaposto>Search the shop</span></span>
          <kbd class="cerca__tasto" aria-hidden="true">/</kbd>
        </label>
      </section>

      <!-- the small previews of the right pages, one at a time -->
      <section class="anteprima" data-anteprima aria-live="polite" hidden>
        <button class="indietro" type="button" data-indietro>
          <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M12.5 8H3.9"/><path d="M7.4 4.4 3.8 8l3.6 3.6"/></svg>
          <span>Back</span>
        </button>

        <div class="vista" data-vista="cappotti">
          <div class="vista__testa" data-pezzo><h2>Winter coats</h2><p>18 styles</p></div>
          <div class="cappotti">
            <article class="capo" data-pezzo><span class="capo__foto capo__foto--a"></span><p>Alder parka</p><p class="capo__prezzo">$420</p></article>
            <article class="capo" data-pezzo><span class="capo__foto capo__foto--b"></span><p>Fell wool coat</p><p class="capo__prezzo">$560</p></article>
            <article class="capo" data-pezzo><span class="capo__foto capo__foto--c"></span><p>Tarn quilted jacket</p><p class="capo__prezzo">$310</p></article>
          </div>
        </div>

        <div class="vista" data-vista="collezioni">
          <div class="vista__testa" data-pezzo><h2>Collections</h2><p>Autumn and winter</p></div>
          <ul class="elenco">
            <li data-pezzo><span>Winter coats</span><span>18</span></li>
            <li data-pezzo><span>Knitwear</span><span>24</span></li>
            <li data-pezzo><span>Rain shells</span><span>9</span></li>
            <li data-pezzo><span>Scarves and gloves</span><span>31</span></li>
          </ul>
        </div>

        <div class="vista" data-vista="giornale">
          <div class="vista__testa" data-pezzo><h2>Journal</h2><p>Notes from the workshop</p></div>
          <ul class="elenco elenco--giornale">
            <li data-pezzo><span>How we wash a waxed jacket</span><span>Nov 14</span></li>
            <li data-pezzo><span>A week on the Fell coast</span><span>Oct 30</span></li>
            <li data-pezzo><span>Why our wool comes from Shetland</span><span>Oct 9</span></li>
          </ul>
        </div>
      </section>
    </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.

59 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 “Typo 404 page” 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 ground, the 404 page of Halden Outerwear, a made-up coat shop. At the top a light pill-shaped address bar, with the padlock, the domain halden.co in grey and the wrong path /colections/winter-coats; under «colections» a thin red wavy line, like the spell checker’s, drawing itself from the left. In the middle a big 404 in Fraunces: the three digits rise tilted and light and straighten on a spring, gaining weight as they land; wherever the pointer passes the nearest digits grow darker. Below, the line «This page took a wrong turn.», the label Did you mean with three pills (/collections/winter-coats, /collections and /journal) and the Search the shop field with its blinking caret and the / key to reach it. Over a pill, a dark ground fills it from the left and the arrow steps three pixels on; a red caret appears in the bar, the wrong part is deleted and the right one typed letter by letter, and the wavy line straightens into a line and fades, while the 404 softens a little. Leaving the pill the address goes back to the wrong one and the line draws itself again. On click the 404 lifts and blurs, the preview of the right page rises from below (the coats with three fabrics and their prices, the list of collections or the journal’s articles) with a Back button; soon the page comes back by itself, the digits bounce and the address goes wrong again. Left alone, the page runs through by itself and at the end types «wool coat» into the search.

How it works

The address that rewrites itself

The path is a single text node. To go from the wrong one to the right one the common part at the start and at the end is found; what is left in the middle is deleted from the right one character at a time (ERASE seconds each), then the new letters are typed (TYPE seconds, in a slightly uneven rhythm). Each step is a call in a GSAP timeline, so it can be stopped halfway and set off towards another address. The red caret is placed where the typing happens by measuring the next character with a Range.

The wavy line

A small svg under the bar, redrawn on every frame by GSAP’s ticker: a Range measures the first segment of the path (from the first slash to the second) and a path of quadratic curves WAVE pixels tall is drawn. To straighten it its height goes to zero, then it fades; to draw it again strokeDashoffset is animated on pathLength 1, with autoRound off. Measures are divided by the bar’s scale, so they stay right when the viewer shrinks the demo.

The spring 404

The digits use font-variation-settings with three CSS variables: --w for the weight, --p for the extra weight near the pointer and --s for Fraunces’s SOFT axis. GSAP animates --w from 200 to WEIGHT while the digits rise with elastic.out; quickTo moves --p towards a value that depends on how far the pointer is from each digit.

Values to change

NameFileDefaultWhat it changes
TYPEscript.js0.065Seconds per letter when the address types the right path.
ERASEscript.js0.034Seconds per letter when the address deletes the wrong part.
WAVEscript.js1.6Height of the wavy line under the wrong segment, in pixels.
SPRINGscript.js0.55Bounce of the 404 digits when they settle (lower = more bounce).
WEIGHTscript.js560Weight of the 404 at rest (Fraunces goes from 100 to 900).
NEARscript.js220Extra weight the digits take when the pointer is close.
SWAPscript.js0.6Seconds the page takes to pass to the preview and back.
HOLDscript.js2.4Seconds the preview stays before the page comes back by itself.
BLINKscript.js0.53Seconds the caret stays on, then off.
AUTOscript.js1.6Seconds before the page runs through by itself, when nobody touches it.

Try them in the Playground

When to use it

For the 404 page of an online shop, a studio or a blog: it turns a mistake into a way on, suggesting the pages closest to the one people were looking for. It works when the most common mistakes are typos in the address.

On phones

The same animations, sized on the height too: the 404 scales with the screen, the pills wrap onto two lines, the search’s / key hides when the screen is short. On tap the pill opens the preview straight away, after putting the address right.

With reduced motion

No springs and no movement: the 404 is already in place, the address changes all at once, the wavy line and the pages crossfade.

Pitfalls

  • The wavy line and the caret are measured with getBoundingClientRect, which is already scaled when the viewer shrinks the demo: divide by the bar’s scale (measured width over offsetWidth), or the line slides off the misspelt part.
  • Switching pill halfway through the rewrite, the old timeline is stopped and the new one starts from the text that is there at that moment, not from the wrong one: otherwise letters jump.
  • The line’s path goes from 0 to 1 with pathLength: without autoRound off GSAP rounds strokeDashoffset and the line pops in instead of drawing itself.

Libraries

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

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

Testing

Tested on 21 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