Skip to content
animorio
IT
All components

Essential oil blend

Counters, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 6.1 KBGSAP 28 KBFreeDownload the zip

An essential oil blend built drop by drop, in a card on white for an aromatherapy shop: three oils, lavender, bergamot and cedarwood, each with its plus and minus, and above them a glass bottle with a pipette. With every drop added the pipette lets one fall in the oil’s colour: it drops through the neck, the surface ripples, the level rises on a spring and the colour of the blend shifts. At the top you read the blend’s character and how many drops out of twelve.

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>
<!--
  "Essential oil blend" 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>Essential oil blend</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">
    <!-- a custom essential oil blend, built drop by drop: three oils with plus and minus, a pipette letting each
         drop fall into the bottle, the level rising and the colour mixing -->
    <section class="ob" data-ob aria-label="Essential oil blend">
      <header class="ob__head">
        <div class="ob__what"><strong>Your blend</strong><span class="ob__clip"><span data-outmood>Mostly calming</span></span></div>
        <span class="ob__total"><b data-outtotal>7</b> of <span data-outmax>12</span> drops</span>
      </header>

      <div class="ob__pad">
        <svg class="ob__svg" viewBox="0 0 300 112" aria-hidden="true">
          <defs><clipPath id="ob-in"><rect x="128" y="46" width="44" height="54" rx="7"></rect></clipPath></defs>
          <ellipse class="ob__shade" cx="150" cy="103" rx="40" ry="4.500"></ellipse>
          <path class="ob__tube" d="M146.500 0v24l2 6h3l2-6V0Z"></path>
          <rect class="ob__oil" data-held x="148" y="12" width="4" height="15" rx="1.500"></rect>
          <path class="ob__drop" data-drop d="M0 -5C2.600 -1.500 3.600 0.200 3.600 1.800a3.600 3.600 0 0 1-7.200 0C-3.600 0.200 -2.600 -1.500 0 -5Z"></path>
          <g clip-path="url(#ob-in)"><path class="ob__liquid" data-liquid></path></g>
          <path class="ob__glass" d="M141 34h18v8c9 1 15 5 15 12v39a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V54c0-7 6-11 15-12Z"></path>
          <path class="ob__shine" d="M132.500 58v32"></path>
          <path class="ob__lip" d="M139 34h22"></path>
        </svg>
      </div>

      <ul class="ob__list">
        <li class="ob__oilrow" data-row data-mood="calming" style="--c: var(--lavender)"><div class="ob__name"><strong>Lavender</strong><span>Calming, floral</span></div><div class="ob__step"><button type="button" data-less aria-label="One drop less of lavender"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8"></path></svg></button><span class="ob__val"><span class="ob__clip ob__clip--val"><span data-outn>4</span></span></span><button type="button" data-more aria-label="One drop more of lavender"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8M8 4v8"></path></svg></button></div></li>
        <li class="ob__oilrow" data-row data-mood="bright" style="--c: var(--bergamot)"><div class="ob__name"><strong>Bergamot</strong><span>Bright, citrus</span></div><div class="ob__step"><button type="button" data-less aria-label="One drop less of bergamot"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8"></path></svg></button><span class="ob__val"><span class="ob__clip ob__clip--val"><span data-outn>2</span></span></span><button type="button" data-more aria-label="One drop more of bergamot"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8M8 4v8"></path></svg></button></div></li>
        <li class="ob__oilrow" data-row data-mood="grounding" style="--c: var(--cedar)"><div class="ob__name"><strong>Cedarwood</strong><span>Grounding, woody</span></div><div class="ob__step"><button type="button" data-less aria-label="One drop less of cedarwood"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8"></path></svg></button><span class="ob__val"><span class="ob__clip ob__clip--val"><span data-outn>1</span></span></span><button type="button" data-more aria-label="One drop more of cedarwood"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8M8 4v8"></path></svg></button></div></li>
      </ul>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </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.

29 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 “Essential oil blend” 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 white, a rounded card: at the top “Your blend”, below it the blend’s character (“Mostly calming”) and on the right the pill “7 of 12 drops”. Then a pale panel with a glass bottle with a dark outline, a white reflection down one side and the oil inside, straw-coloured with a hint of violet; over the neck hangs the pipette, a small tube with a thread of oil in it. Below, three rows: “Lavender, Calming, floral”, “Bergamot, Bright, citrus”, “Cedarwood, Grounding, woody”, each with minus, the number of drops in the oil’s colour and plus. Tapping a plus the key gives and bounces back, a drop in that oil’s colour swells at the tip of the pipette, falls into the bottle’s neck and vanishes into the surface, which ripples and calms; the level rises a little with a bounce and the liquid’s colour shifts towards that oil. The numbers roll and the line at the top changes: “Balanced, calming and bright”. With minus the level goes down and the colour shifts back. At twelve drops the pill turns dark and the plus keys switch off.

How it works

Three numbers

The drops of each oil: their sum gives the level, their proportion the colour, the highest one the character written at the top.

The colour is an average

The red, green and blue of the three oils weighted by their drops, plus the carrier oil counting as a drop and a half: so the first drop tints without taking over.

The drop and the landing

The drop swells at the tip, falls in three tenths of a second and only when it touches the surface do the level, the colour and the ripple start.

The surface

The top of the oil is a curve with a single wave: the amplitude starts at three pixels and dies out in a second, while the phase runs.

Values to change

NameFileDefaultWhat it changes
LAVENDERscript.js4The drops of lavender at the start.
BERGAMOTscript.js2The drops of bergamot at the start.
CEDARscript.js1The drops of cedarwood at the start.
MAXscript.js12How many drops the blend holds in all.
LOOPscript.jstrueLeft alone, the demo’s pointer adds and removes a few drops.

Try them in the Playground

When to use it

On the product page of an essential oil shop, an apothecary or a perfumery making custom blends, or in a diffuser’s app; the same counter with a bottle carries the flavours of a tea, the syrups of a coffee, the pigments of a colour or the ingredients of a cocktail.

On phones

The card is at most 340 pixels wide and about 345 tall. The drawing narrows with the card; the plus and minus keys are 30-pixel circles inside a 34-pixel pill, one per row.

With reduced motion

No falling drop, ripples or bounces: level and colour change in one step, and so do the numbers. The demo’s pointer does not start.

Pitfalls

  • Colour alone does not tell the blend: every oil has its name and its number, and at the top the character is written in words.
  • The oils’ colours are read from the CSS variables: change them in the stylesheet and numbers, drop and mix change together.
  • Level and colour start when the drop lands, not on the tap: with a delay equal to the fall, or the liquid rises before the drop arrives.
  • At the maximum the plus keys are disabled, not hidden: the pill at the top says why.
  • Oils, descriptions and amounts are invented: a real blend has its own safe dilutions.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 2 December 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 components