Skip to content
animorio
IT
Back to the library

Citrus drop loader

Physics, TransitionsGSAP, CSS onlyAdvancedCompressed weight: Demo 9.4 KBGSAP 28 KBFreeDownload the zip

The loader of Zagara Orchard, a made-up Sicilian citrus farm: oranges, lemons, mandarins, slices, leaves and orange blossoms drop from the top and settle on the floor with a small hand-written physics engine while the counter climbs to 100%. Then an orange panel rises from below with a cream hairline on its edge, covers the pile and lifts away to uncover the page. Minimal style, inspired by the Agrumea Farm site.

Rebuilt from scratch studying agrumeafarm.it by Studio K95: 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>
<!--
  "Citrus drop loader" 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>Zagara Orchard · Preserves from a Sicilian grove</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
  <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>
  <!-- A loader for a citrus farm. Oranges, lemons, mandarins, slices, leaves and orange blossoms drop from the top of
       the screen and settle on the floor with a small hand-written physics engine, while a counter climbs to 100%.
       When it is full and the fruit is resting, an orange panel rises from the bottom with a cream hairline running
       across its edge, covers the pile and lifts away to uncover the page. -->

  <main class="pagina" data-pagina>
    <div class="pagina__in">
      <p class="marchio" data-sale-pagina>
        <svg class="marchio__fiore" viewBox="0 0 40 40" aria-hidden="true">
          <g class="marchio__petali">
            <ellipse cx="20" cy="9.5" rx="4.6" ry="8" />
            <ellipse cx="20" cy="9.5" rx="4.6" ry="8" transform="rotate(72 20 20)" />
            <ellipse cx="20" cy="9.5" rx="4.6" ry="8" transform="rotate(144 20 20)" />
            <ellipse cx="20" cy="9.5" rx="4.6" ry="8" transform="rotate(216 20 20)" />
            <ellipse cx="20" cy="9.5" rx="4.6" ry="8" transform="rotate(288 20 20)" />
          </g>
          <circle class="marchio__cuore" cx="20" cy="20" r="4.2" />
        </svg>
        <span class="marchio__nome">Zagara Orchard</span>
      </p>
      <h1 class="titolo">
        <span class="riga"><span class="riga__in" data-riga>Preserves from</span></span>
        <span class="riga"><span class="riga__in" data-riga>a <em>Sicilian</em> grove</span></span>
      </h1>
      <p class="frase" data-sale-pagina>Blood orange marmalade, lemon curd and bergamot jam, picked and cooked the same day.</p>
      <div class="azioni" data-sale-pagina>
        <a class="pulsante" href="#" data-pulsante>
          <span class="pulsante__testo">Visit the pantry</span>
          <span class="pulsante__freccia" aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4" /></svg></span>
        </a>
        <button class="rifai" type="button" data-rifai aria-label="Replay the loader">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M15.6 7.2A6.2 6.2 0 1 0 16.2 12" /><path d="M16.4 3.6v4h-4" /></svg>
          <span>Replay</span>
        </button>
      </div>
    </div>
  </main>

  <section class="carico" data-carico role="progressbar" aria-label="Loading Zagara Orchard" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
    <div class="frutti" data-frutti aria-hidden="true"></div>
    <div class="conta" data-conta>
      <span class="conta__etichetta">Picking the grove</span>
      <span class="conta__numero"><span data-cifra>0</span><span class="conta__per">%</span></span>
      <span class="conta__pista"><span class="conta__riempi" data-pista></span></span>
    </div>
  </section>

  <div class="sipario" data-sipario aria-hidden="true">
    <span class="sipario__filo" data-filo></span>
  </div>

  <svg class="defs" aria-hidden="true" width="0" height="0">
    <defs>
      <!-- whole orange -->
      <symbol id="f-arancia" viewBox="-50 -50 100 100">
        <circle r="46" style="fill:var(--accento)" />
        <circle r="46" fill="url(#g-luce)" />
        <g opacity=".35" style="fill:var(--accento-scuro)">
          <circle cx="-14" cy="-6" r="1.6" /><circle cx="10" cy="-18" r="1.4" /><circle cx="18" cy="8" r="1.6" />
          <circle cx="-4" cy="20" r="1.4" /><circle cx="-24" cy="14" r="1.2" /><circle cx="26" cy="-6" r="1.2" />
        </g>
        <path d="M-2-44c4 2 6 3 8 1" fill="none" stroke-width="3" stroke-linecap="round" style="stroke:var(--inchiostro)" />
      </symbol>
      <!-- orange with a leaf -->
      <symbol id="f-arancia-foglia" viewBox="-50 -50 100 100">
        <circle r="44" cy="4" style="fill:var(--accento)" />
        <circle r="44" cy="4" fill="url(#g-luce)" />
        <g opacity=".35" style="fill:var(--accento-scuro)"><circle cx="-12" cy="2" r="1.5" /><circle cx="14" cy="18" r="1.5" /><circle cx="2" cy="28" r="1.3" /></g>
        <path d="M0-38c2-6 4-9 7-11" fill="none" stroke-width="3" stroke-linecap="round" style="stroke:var(--inchiostro)" />
        <path d="M6-46c12-6 26-2 34 8-12 6-26 4-34-8z" style="fill:var(--inchiostro)" />
        <path d="M9-44c9 0 18 3 26 6" fill="none" stroke-width="1.4" opacity=".35" style="stroke:var(--carta)" />
      </symbol>
      <!-- half orange, cut face -->
      <symbol id="f-mezza" viewBox="-50 -50 100 100">
        <circle r="46" style="fill:var(--accento)" />
        <circle r="40" style="fill:var(--polpa-chiara)" />
        <g style="fill:var(--accento-chiaro)">
          <path d="M0 0 L0-35 A35 35 0 0 1 24.7-24.7Z" /><path d="M0 0 L24.7-24.7 A35 35 0 0 1 35 0Z" />
          <path d="M0 0 L35 0 A35 35 0 0 1 24.7 24.7Z" /><path d="M0 0 L24.7 24.7 A35 35 0 0 1 0 35Z" />
          <path d="M0 0 L0 35 A35 35 0 0 1-24.7 24.7Z" /><path d="M0 0 L-24.7 24.7 A35 35 0 0 1-35 0Z" />
          <path d="M0 0 L-35 0 A35 35 0 0 1-24.7-24.7Z" /><path d="M0 0 L-24.7-24.7 A35 35 0 0 1 0-35Z" />
        </g>
        <g stroke-width="2.6" stroke-linecap="round" style="stroke:var(--polpa-chiara)">
          <path d="M0-36V36M-36 0H36M-25.5-25.5 25.5 25.5M25.5-25.5-25.5 25.5" />
        </g>
        <circle r="4" style="fill:var(--polpa-chiara)" />
      </symbol>
      <!-- thin slice -->
      <symbol id="f-fetta" viewBox="-50 -50 100 100">
        <circle r="46" style="fill:var(--accento-scuro)" />
        <circle r="42" style="fill:var(--polpa-chiara)" />
        <circle r="37" style="fill:var(--accento)" />
        <g stroke-width="2.4" stroke-linecap="round" style="stroke:var(--polpa-chiara)">
          <path d="M0-37V37M-37 0H37M-26-26 26 26M26-26-26 26M-14-34 14 34M14-34-14 34M-34-14 34 14M34-14-34 14" opacity=".8" />
        </g>
        <circle r="5" style="fill:var(--polpa-chiara)" />
      </symbol>
      <!-- lemon -->
      <symbol id="f-limone" viewBox="-50 -50 100 100">
        <path d="M-46 0c0-4 3-6 6-7 6-18 22-27 40-27s34 9 40 27c3 1 6 3 6 7s-3 6-6 7C34 25 18 34 0 34S-34 25-40 7c-3-1-6-3-6-7z" style="fill:var(--accento-chiaro)" />
        <path d="M-46 0c0-4 3-6 6-7 6-18 22-27 40-27s34 9 40 27c3 1 6 3 6 7s-3 6-6 7C34 25 18 34 0 34S-34 25-40 7c-3-1-6-3-6-7z" fill="url(#g-luce)" />
        <g opacity=".4" style="fill:var(--accento)"><circle cx="-12" cy="-12" r="1.4" /><circle cx="14" cy="10" r="1.4" /><circle cx="22" cy="-10" r="1.2" /></g>
      </symbol>
      <!-- mandarin, squat -->
      <symbol id="f-mandarino" viewBox="-50 -50 100 100">
        <ellipse rx="42" ry="36" style="fill:var(--accento-scuro)" />
        <ellipse rx="42" ry="36" fill="url(#g-luce)" />
        <path d="M-6-34c4 3 8 3 12 0" fill="none" stroke-width="3" stroke-linecap="round" style="stroke:var(--inchiostro)" />
        <path d="M2-35c4-10 14-14 24-12-4 9-14 14-24 12z" style="fill:var(--inchiostro)" />
      </symbol>
      <!-- single leaf -->
      <symbol id="f-foglia" viewBox="-50 -50 100 100">
        <path d="M-40 18C-30-22 10-38 42-30 34 6 0 30-40 18z" style="fill:var(--inchiostro)" />
        <path d="M-34 14C-12 0 12-14 36-27" fill="none" stroke-width="2" stroke-linecap="round" opacity=".32" style="stroke:var(--carta)" />
      </symbol>
      <!-- orange blossom, the zagara -->
      <symbol id="f-fiore" viewBox="-50 -50 100 100">
        <g stroke-width="1.5" style="fill:var(--carta-chiara);stroke:var(--linea)">
          <ellipse cy="-24" rx="12" ry="21" /><ellipse cy="-24" rx="12" ry="21" transform="rotate(72)" />
          <ellipse cy="-24" rx="12" ry="21" transform="rotate(144)" /><ellipse cy="-24" rx="12" ry="21" transform="rotate(216)" />
          <ellipse cy="-24" rx="12" ry="21" transform="rotate(288)" />
        </g>
        <circle r="9" style="fill:var(--accento)" />
        <g style="fill:var(--inchiostro)"><circle cx="0" cy="-5" r="1.6" /><circle cx="4.8" cy="-1.5" r="1.6" /><circle cx="3" cy="4" r="1.6" /><circle cx="-3" cy="4" r="1.6" /><circle cx="-4.8" cy="-1.5" r="1.6" /></g>
      </symbol>
      <!-- kumquat -->
      <symbol id="f-kumquat" viewBox="-50 -50 100 100">
        <ellipse rx="40" ry="44" style="fill:var(--accento)" />
        <ellipse rx="40" ry="44" fill="url(#g-luce)" />
        <circle cy="-42" r="3.5" style="fill:var(--inchiostro)" />
      </symbol>
      <radialGradient id="g-luce" cx="35%" cy="30%" r="70%">
        <stop offset="0" stop-color="#fff" stop-opacity=".34" />
        <stop offset=".45" stop-color="#fff" stop-opacity="0" />
        <stop offset="1" stop-color="#3a1f1c" stop-opacity=".16" />
      </radialGradient>
    </defs>
  </svg>

  <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.

31 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 “Citrus drop loader” 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 page is cream. The counter appears in the middle, «Picking the grove» above a large 0% in a soft serif, with a thin line underneath. Fruit starts dropping from the top, drawn flat: whole oranges, one with a leaf, halved oranges with their segments, slices, lemons, mandarins, kumquats, dark leaves and white orange blossoms, twenty-two in all. They fall one after another, bounce a little, knock into each other, roll, squash by a hair when they land and lean on each other as they turn, until the pile comes to rest on the floor. Meanwhile the number climbs to 100%, slowing down, and the line underneath fills up; at 100 the number gives a small kick and settles. Moving the mouse through the fruit pushes it around. When the counter is full and almost all the fruit is still, an orange panel rises from below while a cream hairline runs from left to right along its edge; it covers everything and lifts away, and underneath is the page: the brand blossom opening as it turns, Zagara Orchard, the headline «Preserves from a Sicilian grove» rising line by line from its masks, the sentence and the buttons. After a few seconds, or on Replay, it starts again.

How it works

The fruit are circles

Each fruit is an SVG pulled in with <use> from a symbol and, for the physics, a circle with its own radius (smaller than the drawing for the lemon and the leaf). They are born above the screen, stacked: y = −(d + 140) − i × 56 − random × 110, in pixels scaled by the screen height, with a fixed seed so every round falls the same way.

A small hand-written physics

In fixed steps of 1/240 of a second: gravity, air that slows things by 3% per frame, then two rounds of contacts between every pair, the floor and the sides. Each contact pushes the circles apart, removes the velocity that brings them together (with a small bounce only when the hit is strong) and applies friction along the tangent, which also changes the spin: that is why the fruit rolls and comes to rest turning.

The counter

A GSAP tween from 0 to 1 over COUNT_TIME seconds with power2.out (the cubic ease-out) and COUNT_DELAY of waiting writes the number, the thin bar and aria-valuenow. At 100 the number drops 3 pixels with back.out and settles.

When to close

A fruit is still when it moves slower than 28 pixels a second and barely spins for a quarter of a second. When the share of still fruit reaches SETTLE_RATIO, or MAX_WAIT seconds after 100%, the closing starts. The check is a delayedCall every 0.05 seconds, so everything stays on GSAP’s clock.

The panel and the hairline

The orange panel rises with yPercent from 101 to 0 over the first half of PANEL_TIME with cubic-bezier(.645,.045,.355,1), while the 1-pixel cream hairline goes from scaleX 0 to 1 from the left over LINE_TIME. Halfway the loader disappears underneath, and the panel leaves upwards with cubic-bezier(.19,1,.22,1) while the headline lines rise from their masks.

Values to change

NameFileDefaultWhat it changes
COUNT_TIMEscript.js1.7How long the counter takes from 0 to 100%, in seconds.
COUNT_DELAYscript.js0.3How long the counter waits before starting, in seconds.
GRAVITYscript.js3.35The gravity pulling the fruit down.
BOUNCEscript.js0.08How much the fruit bounces when it hits something, from 0 to 1.
FRICTIONscript.js0.82The friction between the fruit and with the floor: higher means less sliding.
FRUIT_SIZEscript.js1The size of the fruit relative to the screen.
SETTLE_RATIOscript.js0.8The share of fruit that must be still before the panel rises.
MAX_WAITscript.js1.4The longest it waits for the fruit after 100%, in seconds.
PANEL_TIMEscript.js1.8How long the orange panel lasts, rise and exit, in seconds.
LINE_TIMEscript.js1.25How long the cream hairline takes to run along the panel’s edge, in seconds.
PAUSEscript.js3.4How long the page stays uncovered before starting again, in seconds.
--accentostyle.css#e8642cThe only colour: the oranges, the panel and the percent sign.
--cartastyle.css#f8f1e7The cream of the page and the loader.
--inchiostrostyle.css#3a1f1cThe type, the leaves and the stems.

Try them in the Playground

When to use it

For the first visit to the site of a farm, a fruit shop, a jam brand, a restaurant or an ice-cream parlour: a loader that is already the product, that you can watch fall and touch, and that ends in a clean transition instead of just vanishing.

On phones

The same animation with adapted sizes: the fruit and the gravity are sized on the shorter side and the height of the screen, the counter sits a little higher, the headline is sized in vw and vh, and a finger pushes the fruit just like the mouse.

With reduced motion

No falling and no panel: the fruit is already resting in a circle around the counter, the number is at 100% and the page fades in.

Pitfalls

  • The physics runs in fixed steps (1/240 of a second) with an accumulator: with the frame step, at 120 Hz the fruit behaved differently and the pile came out different.
  • A slow contact must not bounce: the bounce applies only above a certain speed, otherwise resting fruit jitters forever and is never counted as still.
  • Friction along the tangent must also change the spin (a disc’s moment of inertia, m·r²/2): without it the fruit slides as if on ice instead of rolling.
  • SVG symbols only pick up colours from variables with style="fill: var(--…)": the fill="var(--…)" attribute is not reliable in every browser.
  • Waiting for the fruit to settle is a GSAP delayedCall, not a setTimeout, so the preview and the video control it like everything else.

Libraries

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

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

Testing

Tested on 1 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 animations