Skip to content
animorio
IT
Back to the library

Olive oil backlit card

Hover, ImagesGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The product card of an extra virgin olive oil from an invented small mill in Apulia, Podere Lume, on a warm paper page: on the left a real photo of corked glass bottles full of oil with pink peppercorns, on the right the name, four notes, the price and Add to cart. At rest the oil sits in the shade of the room. When the pointer passes, the bottle is held up to the light, the way tasters look at a new oil: a warm sun rises behind the glass, the oil lights up from the bottom to the cork, a white glint crosses the bottle and the light that went through the oil falls on the card as a soft caustic that keeps moving. Meanwhile the notes rise one by one, each with a line that fills with oil, and the price rolls a full turn. Add to cart fills with oil like a glass, draws a check and bumps the number on the cart.

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>
<!--
  "Olive oil backlit card" 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 olive oil card that lights up against the light</title>
  <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/fraunces@5.3.0/full.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the product card of a small olive mill, on a warm paper page. At rest the oil sits in the shade. Hovering the
         card holds the bottle up to the light, as tasters do: a warm sun rises behind the glass, the oil lights up from
         the bottom to the cork, a glint crosses the glass and the light that went through it falls on the card as a
         soft caustic. The notes rise one after the other and the price rolls. Add to cart fills with oil -->
    <article class="card" data-card>
      <i class="card__caustic" data-caustic aria-hidden="true"><i class="card__ripples" data-ripples></i></i>

      <figure class="photo" data-photo>
        <i class="photo__sun" data-sun aria-hidden="true"></i>
        <div class="shot" data-shot>
          <img class="shot__img" src="olio.webp" width="1024" height="683" alt="Corked glass bottles of olive oil with pink peppercorns, in a row on a white table, the first one in focus" decoding="async">
          <img class="shot__lit" data-lit src="olio.webp" width="1024" height="683" alt="" aria-hidden="true" decoding="async">
          <span class="shot__glass" data-glass aria-hidden="true"><i class="shot__glint" data-glint></i><i class="shot__rim" data-rim></i></span>
        </div>
        <i class="photo__edge" aria-hidden="true"></i>
        <figcaption class="photo__tag" data-tag>
          <svg viewBox="0 0 12 12" aria-hidden="true"><path d="M6 1.2c2.6 1.4 3.6 3.6 3 6.1-.4 1.9-1.9 3.2-3 3.5-1.1-.3-2.6-1.6-3-3.5C2.4 4.8 3.4 2.6 6 1.2zM6 3.4v7.2"/></svg>
          <span>Early harvest</span>
        </figcaption>
      </figure>

      <section class="info" aria-label="Lume Novello, extra virgin olive oil">
        <header class="info__top">
          <p class="info__mill">Podere Lume<span>Apulia</span></p>
          <span class="cart" data-cart aria-label="Cart">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4.6 7h10.8l-.9 9.2H5.5zM7.4 7V5.8a2.6 2.6 0 0 1 5.2 0V7"/></svg>
            <span class="cart__count" data-count><span class="cart__reel" data-count-reel></span></span>
          </span>
        </header>

        <h1 class="info__name">Lume <em>Novello</em></h1>
        <p class="info__kind">Extra virgin olive oil with pink pepper, 250 ml</p>

        <dl class="notes" data-notes>
          <div class="note" data-note><dt>Taste</dt><dd>Green almond, pepper</dd><i class="note__rule" aria-hidden="true"><i data-rule></i></i></div>
          <div class="note" data-note><dt>Harvest</dt><dd>By hand, 14 October</dd><i class="note__rule" aria-hidden="true"><i data-rule></i></i></div>
          <div class="note" data-note><dt>Vintage</dt><dd>2026, first pressing</dd><i class="note__rule" aria-hidden="true"><i data-rule></i></i></div>
          <div class="note" data-note><dt>Mill</dt><dd>Cold pressed in 4 hours</dd><i class="note__rule" aria-hidden="true"><i data-rule></i></i></div>
        </dl>

        <div class="buy">
          <p class="price" data-price aria-label="24 euros">
            <span class="price__cur">€</span><span class="price__digits" data-digits>24</span><span class="price__cents">.00</span>
          </p>
          <button class="add" type="button" data-add>
            <span class="add__oil" data-oil aria-hidden="true">
              <svg class="add__wave" data-wave viewBox="0 0 120 10" preserveAspectRatio="none"><path d="M0 5c10 0 10-4 20-4s10 4 20 4 10-4 20-4 10 4 20 4 10-4 20-4 10 4 20 4V10H0z"/></svg>
            </span>
            <span class="add__face" data-face>
              <span class="add__words" data-words>Add to cart</span>
              <svg class="add__icon" viewBox="0 0 16 16" aria-hidden="true">
                <path class="add__plus" data-plus d="M8 3.2v9.6M3.2 8h9.6"/>
                <path class="add__check" data-check pathLength="1" stroke-dasharray="1" stroke-dashoffset="1" d="M3.4 8.4l3 3 6.2-6.6"/>
              </svg>
            </span>
          </button>
        </div>
      </section>
    </article>

    <!-- the pointer that walks on its own until a real one arrives -->
    <svg class="pointer" data-pointer viewBox="0 0 20 24" aria-hidden="true">
      <path d="M3 2.2v17.4l4.6-4.3 2.9 6.6 2.9-1.3-2.9-6.4h6.3z"/>
    </svg>
    <i class="grain" data-grain aria-hidden="true"></i>
    <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.

36 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 “Olive oil backlit card” 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 paper page sits a cream card with soft corners, layered shadows and a thread of light on its top edge. On the left, in a rounded frame, a real photo of a row of wavy glass bottles with cork stoppers, full of oil with a few pink peppercorns; the first one is in focus, the others fade behind. At the top a frosted glass tag with a drawn leaf: Early harvest. On the right Podere Lume, Apulia, the cart in a white circle, the name Lume Novello in a serif with an olive green italic, the line Extra virgin olive oil with pink pepper, 250 ml, four notes (Taste, Harvest, Vintage, Mill) divided by thin lines, the price €24.00 and the olive green Add to cart button. At rest the oil is dull, a little grey, and the notes are faded. When the pointer enters the card, a warm sun rises behind the glass, the oil lights up from the bottom to the cork through a soft rising mask, the photo lifts by two pixels, a white glint crosses the first bottle from left to right and the far edge of the glass catches a warm line. On the card, behind the words, a golden caustic opens, a net of light lines that keeps swaying slowly. The notes leave upwards and rise back sharp one by one with a small bounce, and under each a line fills with oil; the price rolls a full turn of digits and stops with a pixel of overshoot. Pressing Add to cart the button gives way, fills with golden oil from the bottom with a sloshing wave, the words become Added to cart, the plus spins away and a check draws itself; on the cart the circle jolts and the number springs out. After a moment the oil drains and the button is back. Leaving, the light goes out and the lines empty. On its own, a drawn arrow comes in, looks at the bottle, passes over the notes and presses the button.

How it works

One photo, two copies

The same photo sits twice, one over the other: below with a filter that dims it (saturate 0.62, brightness 0.93), above with a filter that lights it (saturate 1.55, brightness 1.1 and a touch of sepia). The lit copy has a gradient mask-image tied to the --rise variable: GSAP takes it from −0.4 to 1.2 and the light climbs the oil from the bottom to the cork. On a white backdrop the filter hardly changes anything, so the bottle needs no cut-out.

The photo placed by hand

The .shot box has the photo's pixel size times the cover scale, and the position that keeps the first bottle in the middle of the column (or its neck, when the column is wide as on a phone). So the bottle's outline, in percentages of the photo, always sits over the bottle: the glint is clipped by that clip-path.

The sun and the caustic

The sun is a radial gradient in mix-blend-mode: multiply rising from below: on the white of the photo it becomes the warmth of a window at sunset. The caustic is an SVG with feTurbulence turned into thin lines by an alpha table: where the noise crosses one single value a line is born, like light bent by curved glass. It sits on the card in multiply and drifts slowly while the light is on.

Notes and price

Each note leaves upwards in 0.14 seconds and comes back from below with back.out and a touch of blur, staggered by STAGGER; its line fills with scaleX. The price is a reel per digit holding two runs of 0-9: it lands on the same digit in the second run and a set brings it back to the first, where it looks the same.

The button that fills

Inside the button an oil level as tall as --level and above it an SVG wave twice as wide that slides sideways in a loop: the level rises on power2.inOut and the wave flattens as it calms down. The words change out and in, the plus spins away and the check draws itself by animating the stroke-dashoffset attribute.

Values to change

NameFileDefaultWhat it changes
SUNscript.js1How strong the warm sun behind the bottle is.
GLOWscript.js1How much the oil lights up: 0 stays in the shade.
GLINTscript.js0.9How bright the glint that crosses the glass is.
CAUSTICscript.js1How strong the light thrown on the card is.
RISEscript.js1.4Seconds the light takes to climb the oil to the cork.
STAGGERscript.js0.11Seconds between one note and the next as they rise.
HOLDscript.js2.4Seconds the button stays on Added to cart.
SPEEDscript.js1Speed of the walk on its own: 2 twice as fast, 0.5 half.
LOOPscript.jstrueRepeats the walk on its own forever.

Try them in the Playground

When to use it

For the card of a glass product in an online shop: oil, wine, vinegar, spirits, honey, perfume, cosmetics. When the product lives on light and colour and is worth seeing against the light before buying, in a shop window of a few pieces, on a small producer's page or on a landing page for a new vintage.

On phones

The same animation with adapted sizes: the photo goes on top, wide and low, framed on the neck and shoulder of the bottle; below it the name, the four notes in two columns, the price and the button. A tap on the card holds it up to the light, a tap outside puts it down.

With reduced motion

No movement: the light, the sun and the caustic fade in, the notes brighten one after another without rising, the price does not roll, the button fills with oil in a fade and the check appears already drawn. The drawn arrow is hidden.

Pitfalls

  • With mask-image and a CSS variable inside calc() the gradient only updates if the variable changes on the element itself: GSAP animates '--rise' straight on the lit copy.
  • The price reel lives in an inline-flex box: without align-items: flex-start every column stretches to the height of one digit and yPercent is worked out on that, so only zeros show.
  • Once the oil has drained, a level of 0% still shows the crest of the wave under the edge: at the end of the draining the level goes back to opacity 0.
  • The photo is placed with the column's size, not with object-fit: the bottle's outline and the glint must follow the same scale, and they are worked out again at every resize.

Libraries

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

Compressed with gzip, the three demo files weigh 11 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