Skip to content
animorio
IT
Back to the library

Swatch strip palette

Hover, BackgroundsGSAP, CSS onlyMediumCompressed weight: Demo 6.7 KBGSAP 28 KBFreeDownload the zip

Northfold, a made-up studio, shows its brand palette as six strips side by side: the ones near the pointer widen, the far ones give way, a label with the name and the HEX rides the mouse and rolls to the new colour, and a click copies the code with a tick that draws itself. Minimal style. From the colour chapter of the Squarespace Foundations brand book by Resn, Awwwards Site of the Day on 1/9/2026.

Rebuilt from scratch studying brand.squarespace.com by Resn, Squarespace: 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>
<!--
  "Swatch strip palette" 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>Northfold, brand colour</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@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>
  <!-- Northfold, a made-up studio, shows its brand palette as six strips. The strips near the pointer grow, the far
       ones give way, a label rides the pointer with the name and the HEX of the strip under it, and a click copies
       the HEX. When nobody touches the page a slow tour explores the palette by itself. -->
  <main class="page">
    <header class="top" data-in>
      <p class="brand">
        <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 15V5l7 6 7-6v10" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round"/></svg>
        Northfold
      </p>
      <p class="crumb">Brand guidelines <span>Colour</span></p>
    </header>

    <div class="intro" data-in>
      <h1 class="title">Five quiet tones,<br>one warm voice.</h1>
      <p class="note"><span class="mouse">Hover to explore. Click to copy.</span><span class="touch">Drag to explore. Tap to copy.</span></p>
    </div>

    <section class="panel" data-panel aria-label="Brand palette" data-in>
      <div class="strips" data-strips>
        <button class="strip" type="button" data-strip data-name="Ink" data-hex="#111112"><span class="strip__fill"></span></button>
        <button class="strip" type="button" data-strip data-name="Paper" data-hex="#FAF8F3"><span class="strip__fill"></span></button>
        <button class="strip" type="button" data-strip data-name="Fog" data-hex="#E9E6DF"><span class="strip__fill"></span></button>
        <button class="strip" type="button" data-strip data-name="Stone" data-hex="#C9C5BC"><span class="strip__fill"></span></button>
        <button class="strip" type="button" data-strip data-name="Graphite" data-hex="#3A393B"><span class="strip__fill"></span></button>
        <button class="strip" type="button" data-strip data-name="Ember" data-hex="#D6532F"><span class="strip__fill"></span></button>
      </div>
      <span class="sheen" data-sheen aria-hidden="true"></span>

      <div class="tag" data-tag aria-hidden="true">
        <span class="tag__mask"><span class="tag__row" data-tag-name>Explore</span></span>
        <span class="tag__mask tag__mask--hex"><span class="tag__row" data-tag-hex>&nbsp;</span></span>
        <span class="tag__done" data-done>
          <svg viewBox="0 0 16 16"><path d="M3.2 8.4 6.6 11.6 12.8 4.6" pathLength="1" data-check/></svg>
          <span>Copied</span>
        </span>
      </div>
    </section>

    <div class="names" data-names aria-hidden="true"></div>
    <p class="live" aria-live="polite" data-live></p>
  </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

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 “Swatch strip palette” 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

At the top the Northfold brand and «Brand guidelines, Colour», below the title «Five quiet tones, one warm voice.» and a light card holding six strips of colour: Ink, Paper, Fog, Stone, Graphite and a single accent, Ember, orange. At rest the first two are wide, the others narrow. Moving the mouse, the strips near the pointer widen and the far ones narrow, always softly, and the cursor becomes a label with the name and the HEX of the strip under it, written in white or black depending on the colour, rolling to the new name when you move to another strip. A click copies the HEX: the strip gives a touch and springs back, and under the label a tick draws itself with «Copied». Under the card the names in mono follow the width of each strip, with the tick mark growing on the chosen one and the HEX showing when there is room. A soft light follows the pointer. If nobody touches, a slow tour explores the palette by itself and copies the accent.

How it works

Strips with a weight

Each strip has a weight and its width is the weight over the sum of the weights times the width of the card. At rest the first two weigh 2 and the others 0.4, as on the site: black and white lead, the greys and the accent sit to the side.

A weight that follows the pointer

On every frame, for every strip, the distance between the pointer and its centre is divided by the reach (0.3 of the width) and capped at 1: d. The target is base + (max − base) × (1 − d²), with max 2 for the first two and 1.5 for the others. The pointer is kept 2.5% away from the edges.

The damping

The weight never jumps to the target: cur += (target − cur) × (1 − e^(−8·dt)), with dt in seconds from the GSAP ticker and capped at 0.1. It is a spring with no bounce that does not depend on the frame rate.

A label instead of the cursor

Over the card the cursor is hidden and a label follows the pointer with the same damping, lambda 12. When the strip underneath changes, the name and the HEX leave upwards in 0.18 seconds and come back from below in 0.5 seconds power3.out, in two masks; the type is white or black depending on the luminance of the strip.

Copying the colour

A click writes the HEX to the clipboard, squeezes the strip to a vertical scale of 0.965 and brings it back with elastic.out, and draws the tick from stroke-dashoffset 1 to 0 with «Copied» next to it, gone after a little more than a second.

The names below and the tour

The names under the card move and widen with the strips; the HEX shows once a strip is wider than 70 pixels. If nobody touches for 3.2 seconds a timeline moves a fake pointer across the palette and copies the accent.

Values to change

NameFileDefaultWhat it changes
RADIUSscript.js0.3Reach of the pointer, as a share of the width (the site uses 0.3).
BASE_MAINscript.js2Resting weight of the first two strips (the site uses 2).
BASE_RESTscript.js0.4Resting weight of the other strips (the site uses 0.4).
GROW_MAINscript.js2Weight of the first two under the pointer (the site uses 2).
GROW_RESTscript.js1.5Weight of the others under the pointer (the site uses 1.5).
LAMBDAscript.js8How fast the strips follow, higher is snappier (the site uses 8).
TAG_LAMBDAscript.js12How fast the label follows the pointer (the site uses 12).
TOURscript.js1Speed of the tour when nobody touches.

Try them in the Playground

When to use it

For the colour page of a style guide or a design system, for a studio portfolio presenting an identity, or as a landing section showing the colours of a product: you explore them with the mouse and copy them with a click.

On phones

On a phone the strips follow the dragging finger and a tap copies the HEX; as on the site, on touch screens the strips move less (the first two weigh 1.5). The card is sized on the height that is left, so title, card and names all fit on screen.

With reduced motion

No gliding: the strips take their width at once, the label stays still in the corner of the card and changes name with a fade, the tick appears already drawn and the tour moves from strip to strip in steps.

Pitfalls

  • The damping is written with 1 − e^(−λ·dt) and a capped dt, not with a fixed factor per frame: on a 120 Hz screen it would run twice as fast, and after a background tab it would jump.
  • Widths come from the weight over the sum, and the sum changes on every frame: compute twice, first to find the centres and then to write the widths, or the strips will not fill the card.
  • The press goes on the child of the strip (the tint), not on the strip: the width is written by the loop on every frame and a transform on the same strip would add up badly.
  • The colour of the label type is picked from the real luminance of the colour: Paper and Fog want black, Ember and Graphite want white.

Libraries

GSAP 3.15.0, Archivo (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

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

Testing

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