Skip to content
animorio
IT
Back to the library

The colour columns

Hover, SVGCSS only, GSAPMediumCompressed weight: Demo 6.2 KBGSAP 28 KBFreeDownload the zip

Three full-height columns, each the colour of a herb, with a brush mark that draws itself. Passing over one, the column widens and its drawn plant rises out of the colour.

Rebuilt from scratch studying champohaircare.com by BAO: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "The colour columns" 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>Colour columns</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="colonne" data-colonne>
    <h1 class="nascosto">Three herbs from the garden</h1>
    <p class="nota" data-nota>Hover the columns: each one widens and its plant rises out of its colour.</p>
    <article class="colonna colonna--salvia" data-colonna="salvia">
      <svg class="colonna__pianta" data-pianta viewBox="0 0 300 500" preserveAspectRatio="xMidYMax meet" aria-hidden="true" focusable="false"></svg>
      <svg class="colonna__segno" data-segno viewBox="0 0 120 300" aria-hidden="true" focusable="false"></svg>
      <div class="colonna__testo">
        <h2 class="colonna__nome">Sage</h2>
        <p class="colonna__frase">Scents <em>your hands</em> and the melted butter on Sundays.</p>
        <a class="colonna__bottone" href="#">Discover sage</a>
      </div>
    </article>
    <article class="colonna colonna--lavanda" data-colonna="lavanda">
      <svg class="colonna__pianta" data-pianta viewBox="0 0 300 500" preserveAspectRatio="xMidYMax meet" aria-hidden="true" focusable="false"></svg>
      <svg class="colonna__segno" data-segno viewBox="0 0 120 300" aria-hidden="true" focusable="false"></svg>
      <div class="colonna__testo">
        <h2 class="colonna__nome">Lavender</h2>
        <p class="colonna__frase">In drawers, in biscuits, <em>in sleep</em>.</p>
        <a class="colonna__bottone" href="#">Discover lavender</a>
      </div>
    </article>
    <article class="colonna colonna--zafferano" data-colonna="zafferano">
      <svg class="colonna__pianta" data-pianta viewBox="0 0 300 500" preserveAspectRatio="xMidYMax meet" aria-hidden="true" focusable="false"></svg>
      <svg class="colonna__segno" data-segno viewBox="0 0 120 300" aria-hidden="true" focusable="false"></svg>
      <div class="colonna__testo">
        <h2 class="colonna__nome">Saffron</h2>
        <p class="colonna__frase">Three threads are enough to <em>warm</em> a risotto.</p>
        <a class="colonna__bottone" href="#">Discover saffron</a>
      </div>
    </article>
  </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.

26 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 “The colour columns” 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

The screen is split into three columns of solid colour: sage, lavender and saffron. At the top of each a black calligraphic brush mark draws itself, one after the other, thickening where the stroke goes down and thinning where it runs sideways; below sit the name, a sentence with its fragrant word in italics, and a square button. Passing the mouse over a column, it widens, its mark lifts slightly, the other two lose a little colour, and its drawn plant rises from the bottom: the sage with its paired leaves and violet spike, the lavender with its stems, the saffron crocus with its red threads. Leaving it, the plant sinks back into the colour.

How it works

A nib in thirty lines

Each mark is a single SVG line. The script measures it with getPointAtLength at 120 points and, for each, moves one point left and one right along the normal: the thickness is width × (0.12 + 0.88 × sin(πt)^0.55) × (0.42 + 0.58 × |dy|), that is thin at the tips and full where the stroke goes down, like a nib held at an angle. The left points and the right ones, reversed, close the outline.

Drawing a filled shape

A filled outline cannot be drawn with stroke-dashoffset. The trick is a mask: the same centre line, 1.8 times as wide as the brush, with pathLength 1 and a dashoffset going from 1.02 to 0 in 1.3 seconds with power2.inOut. It uncovers the filled mark as it runs, and the leading edge is a clean cut, like the brush coming down.

The widening column

The columns are flex: 1 1 0, and the active one goes to flex-grow 1.5 with a 0.7-second CSS transition. The others get filter: saturate(0.72) brightness(0.95). The plant, under the text, starts at opacity 0, 5% lower and scale 1.06, and settles in 1.1 seconds: it seems to rise out of the colour and come to rest.

What is underneath

Instead of pointerenter on each column, a single pointermove listener on the window asks which column is under the pointer and lights only that one. With the keyboard, the column of the focused button lights up; on phones the columns stack, the plants stay visible and the marks draw themselves when each column reaches the screen.

Values to change

NameFileDefaultWhat it changes
SEGNIscript.js3 segniThe line of each mark, in 120 × 300, and the brush width: any line becomes a calligraphic stroke.
DISEGNAscript.js1.3The seconds to draw a mark.
--cstyle.css#A3B596, #A99BD1, #E6A23CThe colour of each column.
flex-growstyle.css1.5How much the active column widens.

Try them in the Playground

When to use it

To present three lines, three seasons, three services or three characters of a product, when each has its own colour and one gesture is enough to meet them.

On phones

The columns stack, each almost a screen tall; the plants are always visible and each mark draws itself when its column enters the screen.

With reduced motion

The marks are already drawn, the columns keep their width and the plant appears in place with a 150-millisecond fade.

Pitfalls

  • To measure a path with getTotalLength and getPointAtLength, the path must sit in an SVG in the document: here an invisible SVG works as a ruler.
  • With pathLength 1 and stroke-dasharray «1 1» the dash repeats every 2: shifted by 1.02 to hide it, a sliver shows at the end of the line. With «1 3» the next dash is far away; the shift stays 1.02 rather than 1, because of rounding.
  • flex-grow animates well only if the columns start from flex-basis 0: with basis auto the width depends on the text and the transition jumps.
  • The filter on the dimmed columns belongs on the columns, not the container, or the active one dims too.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 21 October 2026

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

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