Skip to content
animorio
IT
Back to the library

Code lines logo loader

Intro, SVGGSAPMediumCompressed weight: Demo 5.3 KBGSAP 28 KBFreeDownload the zip

The logo intro of Linum, a made-up linen company, in the clean style of today’s products: a shuffled barcode prints itself from the left, then its lines slide sideways and change thickness until they form the letters of the name, like a stencil made of bars. A scan line crosses the logo and lights it up, and the line underneath types itself.

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>
<!--
  "Code lines logo loader" 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 logo whose lines line up like a code</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.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>
  <main class="palco" data-palco>
    <!-- the intro of a linen brand: a shuffled barcode slides, line by line, into the letters of the name,
         a scan line passes and lights the mark, then the line underneath types itself -->
    <div class="blocco" data-blocco>
      <svg class="marchio" data-marchio aria-hidden="true">
        <defs>
          <linearGradient id="scan-glow" x1="0" y1="0" x2="1" y2="0">
            <stop offset="0" style="stop-color: var(--accento); stop-opacity: 0"/>
            <stop offset="1" style="stop-color: var(--accento); stop-opacity: 0.16"/>
          </linearGradient>
        </defs>
        <g class="barre" data-barre></g>
        <g class="scansione" data-scan>
          <rect class="scansione__alone" data-scan-glow fill="url(#scan-glow)"/>
          <rect class="scansione__riga" data-scan-line/>
        </g>
      </svg>
      <p class="cifre" data-cifre aria-hidden="true"></p>
      <h1 class="nome" data-nome></h1>
      <p class="frase" data-frase></p>
    </div>
    <button class="replay" type="button" data-replay>
      <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.2 8a4.8 4.8 0 1 0 1.5-3.5"/><path d="M3 2.4v3h3"/></svg>
      <span>Replay</span>
    </button>
  </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.

13 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 “Code lines logo loader” 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 background a thin line stretches from the left and a barcode prints itself above it: the lines rise one after another, of different thicknesses, and its digits type themselves underneath. The digits leave and the lines move: each one slides sideways to its place, widens or narrows and gets shorter, some cross each other, and the ones not needed thin out until they vanish. Once there, they go a pixel past and come back, and the lines have formed the letters of the name, Linum, like a stencil made of vertical bars. The baseline pulls away, then a red scan line crosses the logo with a glow trailing it: every line it passes lights up red with a little hop. The logo rises a pixel and settles, and underneath the line types itself letter by letter, with the caret waiting. Replay appears and after a pause it all starts again.

How it works

Letters made of columns

Each letter is a grid of 5 columns by 7 rows. In each column the filled squares one under the other become a single rectangle, 8 of 10 wide: so the letters are made only of vertical bars, with a hair of gap between one column and the next, like a stencil.

The code from the same lines

The barcode has as many lines as the letters need, plus a third more that will vanish. Thicknesses are picked at random among five, with a fixed-seed generator, and the row is stretched to the width of the name. Each real line takes a slot near its order, then part of the slots swap: that is SHUFFLE.

One pixel past

Each line goes with expo.inOut to its x plus OVERSHOOT in the direction it was moving, together with width, y and height; then in 0.28 seconds it comes back to the right x. The starts are staggered at random within 0.38 seconds, always the same on every loop.

The scan

The line and its glow cross the logo in SCAN seconds with ease none; each line lights up at the moment the line passes its x, that is SCAN times x divided by the width, with a 1.2 unit hop that comes back with back.out.

Values to change

NameFileDefaultWhat it changes
NAMEscript.jsLINUMThe brand, letters A to Z only (7 at most).
TAGLINEscript.jsLinen, traced back to the field.The line that types itself under the logo.
ACCENTscript.js#e8452cThe colour that lights the logo as the scan passes.
ALIGNscript.js1.2The seconds the barcode lines take to settle into the letters.
SHUFFLEscript.js0.6How shuffled the barcode is: 0 in order, 1 all mixed.
SCANscript.js0.8The seconds the scan line takes to cross the logo.
OVERSHOOTscript.js1How far past their place the lines go before stopping.
HOLDscript.js2.4The seconds the logo stays before the intro plays again.

Try them in the Playground

When to use it

For the first-visit entrance or the loader of the site of a product brand, a fabric or fashion shop, a company that talks about supply chain and traceability: the barcode becoming the name says «this product has an origin».

On phones

The same animation: the logo is sized on both the width and the height of the window, so the whole name stays inside even the phone’s short box.

With reduced motion

Nothing moves: the logo appears already lit, with the line, in a fade.

Pitfalls

  • In an SVG gradient a stop-color written as an attribute does not read var(): the variable’s colour goes into the stop’s style.
  • The randomness must have a fixed seed and the staggers be computed once: otherwise every loop is different and the preview video cannot find the end of the loop.

Libraries

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

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

Testing

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