Skip to content
animorio
IT
Back to the library

Breathing app petals

Scroll, SVGGSAP, CSS onlyMediumCompressed weight: Demo 9.0 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The landing page of a made-up breathing app, Ebb, in the minimal style: the page stays still and the scroll becomes the breath of the 4-7-8 method. In the middle a flower of thin petals drawn in SVG, in three rings, opens as you breathe in for four seconds, stays open and barely alive while you hold for seven and closes as you breathe out for eight; each ring follows on its own spring, so the outer petals arrive a beat later and settle. The word in the middle (Inhale, Hold, Exhale) changes with a settle, the chapter at the side counts its seconds, a dial of hairline ticks lights up the nineteen seconds and at the end the «Start a session» pill arrives.

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>
<!--
  "Breathing app petals" 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>Ebb, breathe in four</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>
  <!-- the landing page of a made-up breathing app, Ebb. The page sticks while you scroll and the scroll is the breath:
       a flower of thin petals in three rings opens as you breathe in for four seconds, rests while you hold for seven
       and closes as you breathe out for eight. The word in the middle changes with a settle, the chapter at the side
       counts its seconds, a dial of hairline ticks keeps the time and at the end the page offers a session. -->
  <main>
    <section class="viaggio" data-viaggio>
      <div class="palco" data-palco>
        <div class="alone" aria-hidden="true"></div>
        <div class="grana" aria-hidden="true"></div>

        <header class="testa">
          <span class="marchio">
            <svg class="marchio__segno" viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 13a6.5 6.5 0 0 1 13 0"/><path d="M6.5 13a3.5 3.5 0 0 1 7 0"/><path d="M2 16.5h16"/></svg>
            <span class="marchio__nome">Ebb</span>
          </span>
          <span class="testa__metodo">The 4-7-8 method</span>
        </header>

        <div class="scena">
          <ol class="capitoli" aria-label="The three parts of a breath">
            <li class="capitolo" data-capitolo data-secondi="4">
              <span class="capitolo__nome">Inhale</span>
              <span class="capitolo__conto"><span class="capitolo__fessura"><span class="capitolo__cifra" data-cifra>4</span></span><span class="capitolo__unita">s</span></span>
              <span class="capitolo__riga">Through the nose, belly first.</span>
              <span class="capitolo__filo" aria-hidden="true"><i data-filo></i></span>
            </li>
            <li class="capitolo" data-capitolo data-secondi="7">
              <span class="capitolo__nome">Hold</span>
              <span class="capitolo__conto"><span class="capitolo__fessura"><span class="capitolo__cifra" data-cifra>7</span></span><span class="capitolo__unita">s</span></span>
              <span class="capitolo__riga">Stay soft at the top.</span>
              <span class="capitolo__filo" aria-hidden="true"><i data-filo></i></span>
            </li>
            <li class="capitolo" data-capitolo data-secondi="8">
              <span class="capitolo__nome">Exhale</span>
              <span class="capitolo__conto"><span class="capitolo__fessura"><span class="capitolo__cifra" data-cifra>8</span></span><span class="capitolo__unita">s</span></span>
              <span class="capitolo__riga">Out through the mouth, slowly.</span>
              <span class="capitolo__filo" aria-hidden="true"><i data-filo></i></span>
            </li>
          </ol>

          <div class="fiore" data-fiore>
            <svg class="fiore__svg" viewBox="-200 -200 400 400" aria-hidden="true">
              <defs>
                <radialGradient id="velo" cx="0" cy="0" r="170" gradientUnits="userSpaceOnUse">
                  <stop offset="0" style="stop-color: var(--accento); stop-opacity: 0"/>
                  <stop offset="0.55" style="stop-color: var(--accento); stop-opacity: 0.05"/>
                  <stop offset="1" style="stop-color: var(--accento); stop-opacity: 0.13"/>
                </radialGradient>
              </defs>
              <g class="quadrante" data-quadrante></g>
              <circle class="guida guida--fuori" r="166"/>
              <circle class="guida guida--dentro" r="83"/>
              <g data-onde></g>
              <g class="strati" data-strati></g>
              <circle class="seme__ombra" r="60" cy="3"/>
              <circle class="seme" data-seme r="60"/>
            </svg>
            <div class="parola" aria-live="polite"><span class="parola__fessura"><span class="parola__testo" data-parola>Breathe</span></span></div>
          </div>

          <div class="lato">
            <h1 class="lato__titolo">Four in.<br>Seven held.<br>Eight out.</h1>
            <p class="lato__testo">Ebb paces one breath at a time, the slow rhythm that settles a busy mind before sleep.</p>
            <p class="lato__dato"><b>76 s</b> for four breaths</p>
          </div>
        </div>

        <div class="piede">
          <p class="invito" data-invito>Scroll slowly and breathe with it</p>
          <a class="pillola" href="#" data-pillola>
            <span class="pillola__fondo" aria-hidden="true"></span>
            <span class="pillola__parole">Start a session</span>
            <svg class="pillola__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.6 4l4 4-4 4"/></svg>
          </a>
        </div>
      </div>
    </section>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

39 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 “Breathing app petals” 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 paper-coloured page with a veil of grain and a soft light behind the middle, at the top the Ebb mark and the «The 4-7-8 method» label. In the middle a flower of thin-line petals, sage green and barely veiled, in three rings (six, eight and twelve petals) around a pale pebble with the word. Two dashed circles mark the closed and the open flower, and a dial of 76 ticks, one every quarter of a second, runs all around. On a computer the three chapters (Inhale 4 s, Hold 7 s, Exhale 8 s) sit on the left with a line each and the title «Four in. Seven held. Eight out.» on the right; on a phone the chapters sit in a row under the flower. On arrival the rings open from the middle one after the other. As you scroll: the word becomes Inhale, the flower opens turning like an iris (the rings in opposite directions), the chapter counts 1, 2, 3, 4 on a roller and its line fills, the ticks light up one after another with the last one thicker. In Hold the flower stays open but barely breathes and the rings drift slowly; in Exhale it closes over eight seconds with the outer rings lagging. At every change of phase a thin ring leaves the edge and fades. At the end the word becomes Rest and the «Start a session» pill rises, widening and swelling with a bounce on hover.

How it works

A still page and a long breath

The section is 700vh tall with a sticky 100lvh stage inside. ScrollTrigger only gives the progress, from 0 to 1, which becomes a time in seconds: an arrival of 1.2, then 4 in, 7 held, 8 out and 2.6 of rest. Lenis smooths the scroll and the time chases the progress through an exponential filter, so even a stepped wheel gives a continuous breath.

The breath as a curve

From the time comes how full the breath is, from 0 to 1: sine.inOut while breathing in, 1 while holding, power1.inOut going down while breathing out. It is the value the three rings of petals want to reach.

Three rings, three springs

Each ring is an SVG group of petals drawn with two Bézier curves, and it chases the breath on its own spring, a little softer from the inside out: the outer petals arrive later and settle. It scales from CLOSED to 1 and turns a few degrees, in opposite directions, like an iris. At every change of phase the springs get a small push, for the one-pixel settle.

Word, chapters and dial

When the phase changes the word leaves upwards narrowing and the new one comes in from below wide and goes back to its width with back.out, on Mona Sans’s wdth axis. The active chapter counts its seconds on a roller and fills its line, the dial lights a tick every quarter of a second and a thin ring leaves the edge of the flower and fades.

Sizes

The flower is an SVG with a fixed viewBox, as large as --d: on a phone min(80vw, 100vh − 226px), on a computer min(44vw, 100vh − 170px). The lines use vector-effect: non-scaling-stroke, so they stay one pixel thick even when the flower is small.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole breath takes: 2 is twice as long.
CLOSEDscript.js0.5How small the flower is with empty lungs; 1 is fully open.
SPRINGscript.js90Stiffness of the rings’ springs: higher follows the scroll more tightly.
BOUNCEscript.js0.22How much the rings overshoot and settle: 0 none, 0.5 lively.
LAGscript.js1How late the outer rings arrive: 0 all together.
TWISTscript.js1How much the rings turn as they open, like an iris: 0 straight.
PETALSscript.js8Petals in the middle ring (the inner one has fewer, the outer one more).

Try them in the Playground

When to use it

For the page of a meditation, breathing, sleep or wellness app, for a yoga or pilates studio, for a landing page section that should slow the reader down, or for any timed exercise to guide by scrolling.

On phones

The same animation with adapted sizes: the flower is sized on width and height and the chapters sit in a row under it, without their line of text; the title on the right only shows on wide screens. Everything fits the box at every point of the scroll.

With reduced motion

The flower does not change size or turn: the breath shows through the rings fading in and out. Word and digits change with a fade, no ripples, no springs, no Lenis.

Pitfalls

  • If the petals follow the scroll directly, a stepped wheel makes the flower breathe in hiccups: the time must be filtered and the spring placed after it, on each ring.
  • As the flower shrinks the lines would become half a pixel: vector-effect: non-scaling-stroke keeps them equally thin at every size.
  • In SVG the stop-color attributes do not read CSS variables: the gradient colour goes in the style.
  • The scale goes on the group with svgOrigin 0 0 (the centre of the viewBox), otherwise GSAP scales from a corner.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 9.0 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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