Skip to content
animorio
IT
Back to the library

Photo preset strip

Images, HoverGSAP, CanvasMediumCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

An image animation on a real panel: the Looks of Tintra, a made-up photo editor, dark on a near black page. The real photo of a white house with a big arch and blue doors under a deep sky is drawn in a canvas, and every preset of the strip is a real colour grade computed on its pixels. Picking a look, the new colour sweeps across the photo behind a thread of light, the ring slides onto the thumbnail on a spring and stretches as it travels, the name rolls in the pill with a check that draws itself and the light behind the panel takes the colour of the look. The Strength slider mixes the look with the original live, and holding the photo shows the original again.

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>
<!--
  "Photo preset strip" 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 photo that changes look from the preset strip</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the Looks panel of Tintra, an invented photo editor. The photo (a real CC0 photo of a white house with an arch
         and blue doors under a deep sky, casa.webp) is drawn in a canvas; every look is a real colour grade computed on its pixels. Picking a look
         from the strip, the new grade sweeps across the photo behind a thin line of light, the ring slides to the
         chosen thumbnail on a spring, the name rolls in the pill and the light behind the panel takes its colour -->
    <span class="halo" data-halo aria-hidden="true"></span>
    <section class="editor" data-editor aria-label="Tintra photo editor, looks">
      <header class="editor__head">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
            <defs>
              <linearGradient id="mk" x1="0" y1="0" x2="1" y2="1">
                <stop offset="0" stop-color="#ffd2a1"/>
                <stop offset="1" stop-color="#e0703a"/>
              </linearGradient>
            </defs>
            <rect x="1" y="1" width="18" height="18" rx="5.5" fill="url(#mk)"/>
            <path d="M5.5 13.6c1.6-4.4 3.4-6.6 5.4-6.6 1.6 0 2.6 1.3 3.6 3.4" fill="none" stroke="#2a1408" stroke-width="1.6" stroke-linecap="round"/>
          </svg>
          <span class="brand__name">Tintra</span>
          <span class="brand__file">casa-arco.dng</span>
        </span>
        <span class="pill" data-pill>
          <svg class="pill__check" viewBox="0 0 12 12" aria-hidden="true"><path data-check pathLength="1" d="M2.4 6.3l2.3 2.3 4.9-5.1"/></svg>
          <span class="pill__win"><span class="pill__word" data-word>Original</span></span>
        </span>
      </header>

      <div class="photo" data-photo>
        <div class="photo__inner" data-inner>
          <canvas class="photo__canvas" data-canvas role="img" aria-label="A white house with an arch, blue doors and terracotta pots under a deep blue sky"></canvas>
        </div>
        <span class="photo__edge" aria-hidden="true"></span>
        <span class="photo__tag" data-tag aria-hidden="true">Original</span>
        <button class="compare" type="button" data-compare aria-label="Hold to compare with the original">
          <svg viewBox="0 0 14 14" aria-hidden="true">
            <rect x="1.5" y="2.5" width="11" height="9" rx="2.2" fill="none" stroke="currentColor" stroke-width="1.2"/>
            <path d="M7 2.5v9" stroke="currentColor" stroke-width="1.2"/>
            <path d="M7 2.5h3.3a2.2 2.2 0 0 1 2.2 2.2v4.6a2.2 2.2 0 0 1-2.2 2.2H7z" fill="currentColor" opacity="0.55"/>
          </svg>
          <span>Hold to compare</span>
        </button>
      </div>

      <div class="strip" data-strip role="radiogroup" aria-label="Looks">
        <span class="strip__ring" data-ring aria-hidden="true"></span>
        <button class="look" type="button" role="radio" aria-checked="true" data-look="0"><span class="look__lift"><canvas class="look__thumb"></canvas></span><span class="look__name">Original</span></button>
        <button class="look" type="button" role="radio" aria-checked="false" data-look="1"><span class="look__lift"><canvas class="look__thumb"></canvas></span><span class="look__name">Ember</span></button>
        <button class="look" type="button" role="radio" aria-checked="false" data-look="2"><span class="look__lift"><canvas class="look__thumb"></canvas></span><span class="look__name">Fjord</span></button>
        <button class="look" type="button" role="radio" aria-checked="false" data-look="3"><span class="look__lift"><canvas class="look__thumb"></canvas></span><span class="look__name">Silver</span></button>
        <button class="look" type="button" role="radio" aria-checked="false" data-look="4"><span class="look__lift"><canvas class="look__thumb"></canvas></span><span class="look__name">Velvet</span></button>
      </div>

      <div class="amount" data-amount>
        <span class="amount__label">Strength</span>
        <div class="slider" data-slider role="slider" tabindex="0" aria-label="Strength of the look" aria-valuemin="0" aria-valuemax="100" aria-valuenow="100">
          <span class="slider__track"><span class="slider__fill" data-fill></span></span>
          <span class="slider__thumb" data-thumb><span class="slider__knob" data-knob></span></span>
        </div>
        <span class="amount__value" data-value>100</span>
      </div>
    </section>
    <p class="sr" 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.

28 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 “Photo preset strip” 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 near black page, with a soft light behind it and a fine grain, the dark panel of Tintra rises, a made-up photo editor: at the top its orange mark, the name, the file casa-arco.dng and a grey pill that says Original. In the middle the photo, a real one: a white Mediterranean house with a big arch in front of the entrance, blue glass doors, two terracotta pots with a small tree, bougainvillea on the right, the pale courtyard and a deep blue sky, with a fine sensor grain. At the bottom left, over the photo, a glass pill says Hold to compare. Below is the preset strip: five thumbnails of the same photo, Original, Ember, Fjord, Silver and Velvet, each already in its own colour, and the orange ring around the chosen one. Further down the Strength slider with its number. Ember is picked: the thumbnail gives and comes back on a spring, the ring slides there stretching as it travels and lands passing the mark, and the new colour, warm and contrasty, sweeps diagonally across the photo behind a thread of pale light; the pill turns orange, the name rolls from Original to Ember with a check drawing itself and the light behind the panel turns orange. Then the slider goes down to 42, mixing the look with the original live, and back up to 80. Fjord comes, cold and faded, then Silver, a contrasty black and white; holding compare the photo fades back to the original and the Original label appears at the top. Finally Velvet, with plum blacks and peach highlights, and Original again, with the slider dimming. It also really works: the thumbnails can be picked with a click, a finger or the arrow keys, the slider can be dragged and the photo held for the comparison.

How it works

The photo drawn once

The real photo (casa.webp, next to the demo) is drawn in a canvas as big as the box at the screen's density (900 pixels wide at most), cropped like object-fit: cover, and the demo starts only once the photo is decoded. On top a light grain with a fixed seed, always the same.

Five looks computed on the pixels

Every preset is a list of numbers: exposure, warmth, contrast with an S curve, saturation, a tint for the shadows and one for the highlights (split toning), lifted blacks and a vignette; Silver goes through the luminance with a slightly warm tone. With getImageData every look is computed only once and kept in a canvas of its own, which also gives the thumbnails. Opened from file:// the canvas cannot read its pixels: getImageData throws and the same five looks are made with canvas filters (contrast, saturation, black and white) and colour washes in soft-light, reading nothing, so the photo shows and the looks still work.

The colour sweeping across

Picking a look, what is on screen is copied into a separate canvas. Every frame that is drawn, then the new look clipped with destination-in by a slanted linear gradient whose soft edge GSAP carries from one side to the other; on the edge a narrow gradient in screen mode makes the thread of light.

Strength and the comparison

The slider recomputes nothing: the look is drawn over the original with globalAlpha equal to its strength. The comparison is a second number taking the strength to zero; both mark the photo as needing a redraw, and a single gsap.ticker redraws it at most once per frame.

The ring, the pill and the light

The ring goes onto the thumbnail with back.out and meanwhile stretches in proportion to the distance it travels, then comes back with an elastic. The name in the pill leaves at the top and comes back from below while the window's width moves to the new word; the light behind the panel is a CSS variable with the three channels of the look's colour.

Values to change

NameFileDefaultWhat it changes
WIPEscript.js0.95How long the new look takes to sweep across the photo, in seconds.
ANGLEscript.js18The slant of the sweep, in degrees (0 = straight from left to right).
SOFTNESSscript.js0.16How soft the edge of the sweep is, as a share of the photo.
SHEENscript.js0.6How bright the thread of light on the edge is.
GRAINscript.js4The grain of the photo, 0 = none.
RING_BOUNCEscript.js1.7How far the ring overshoots when it lands on a thumbnail.
SPEEDscript.js12 = the walk on its own twice as fast, 0.5 = half.
LOOPscript.jstrueRepeats the walk through the looks.

Try them in the Playground

When to use it

For a photo editor or a photo editing app, for the page of a photographer selling presets, for a portfolio showing the same shot in several versions, or for a configurator where you pick the finish of an image while watching it change.

On phones

The same animation with adapted sizes: the panel is as wide as the box and also shrinks with the height, the photo and the thumbnails are redrawn at the new size, the strip is picked with a finger, the slider is dragged without scrolling the page and the photo is held for the comparison.

With reduced motion

No diagonal sweep nor thread of light: the new look fades in over the photo, the ring moves to the thumbnail at once, the name changes with a fade and the thumbnails and the pill do not bounce.

Pitfalls

  • The sweep has to start from what is on screen, not from the previous look: picking a look halfway through another sweep, copying the visible canvas means there is no jump.
  • Computing the looks on every move of the slider would be too slow: they are computed once and the slider mixes the ready canvases with globalAlpha.
  • GSAP's transform on the thumbnail's button would wipe out the CSS one that lifts it: GSAP presses the button, the CSS lifts the child.
  • From file:// the photo taints the canvas and getImageData throws: without the try/catch nothing would show. The photo is drawn anyway and the looks fall back to canvas filters.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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