Skip to content
animorio
IT
Back to the library

Sleep app features

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

Scroll inside the preview

The features section of a made-up sleep app, Lull, on scroll, in the premium style of Dribbble landing pages: on a dark page with a lavender light behind, a still phone on the right and on the left the feature name and the index. At each feature the dynamic island swells into the pill with the name, the new screen pours out of it and fills the glass, wide first and then down, with a thread of light on its edge, while the one before steps back under a veil; then the island settles into the feature’s live activity. Four features: Wind down with the breathing orb, Soundscapes with the sound wave, Smart alarm with the wake window on the dial and Morning report with the stages of the night drawing themselves.

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>
<!--
  "Sleep app features" 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>Lull, features</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 features section of a made-up sleep app, Lull, on a dark page. The stage sticks while you scroll and the
       phone stays still: at every feature the dynamic island swells into a pill with the feature's name, the next
       screen pours out of it and fills the glass while the screen before steps back, then the island settles into the
       feature's own live activity. Beside the phone the feature name rises and the pill of the index slides to it. -->
  <main>
    <section class="tour" data-tour>
      <div class="stage" data-stage>
        <div class="glow" data-glow aria-hidden="true"></div>
        <div class="grain" aria-hidden="true"></div>

        <div class="layout">
          <div class="side">
            <p class="kicker" data-in>Lull for iPhone</p>
            <div class="names" data-in aria-hidden="true">
              <span class="name" data-name>Wind down</span>
              <span class="name" data-name>Soundscapes</span>
              <span class="name" data-name>Smart alarm</span>
              <span class="name" data-name>Morning report</span>
            </div>
            <div class="descs" data-in aria-hidden="true">
              <p class="desc" data-desc>A breathing guide that slows you down before bed, in eight quiet minutes.</p>
              <p class="desc" data-desc>Rain, brown noise and night forest, mixed to fade out as you fall asleep.</p>
              <p class="desc" data-desc>Lull wakes you in your lightest sleep, inside a thirty minute window.</p>
              <p class="desc" data-desc>Every morning, how you slept: stages, time asleep and one honest score.</p>
            </div>
            <nav class="index" data-index data-in aria-label="Features">
              <span class="index__pill" data-pill aria-hidden="true"><i data-fill></i></span>
              <button class="index__item" type="button" data-go="0">Wind down</button>
              <button class="index__item" type="button" data-go="1">Soundscapes</button>
              <button class="index__item" type="button" data-go="2">Smart alarm</button>
              <button class="index__item" type="button" data-go="3">Morning report</button>
            </nav>
          </div>

          <div class="phone-wrap" data-phone-wrap>
            <div class="phone" data-phone>
              <span class="phone__key phone__key--a" aria-hidden="true"></span>
              <span class="phone__key phone__key--b" aria-hidden="true"></span>
              <span class="phone__key phone__key--c" aria-hidden="true"></span>
              <div class="screen" data-screen>
                <div class="status" data-status aria-hidden="true"><b>22:41</b><span class="status__icons"><i></i><i></i><i></i></span></div>

                <!-- the island: a label with the feature's name, then the feature's live activity -->
                <div class="island" data-island aria-hidden="true">
                  <span class="isl isl--label" data-label>
                    <svg viewBox="0 0 16 16"><path d="M11.8 10.4A5 5 0 0 1 5.6 4.2a5 5 0 1 0 6.2 6.2z"/></svg><b>Wind down</b>
                  </span>
                  <span class="isl isl--label" data-label>
                    <svg viewBox="0 0 16 16"><path d="M2 8h1.5M5 5v6M8 3v10M11 5.5v5M12.5 8H14"/></svg><b>Soundscapes</b>
                  </span>
                  <span class="isl isl--label" data-label>
                    <svg viewBox="0 0 16 16"><circle cx="8" cy="8.8" r="5"/><path d="M8 6.2v2.6l1.8 1.1M3.2 3.4l1.6-1.2M12.8 3.4l-1.6-1.2"/></svg><b>Smart alarm</b>
                  </span>
                  <span class="isl isl--label" data-label>
                    <svg viewBox="0 0 16 16"><path d="M2 12.5h12M4 12.5a4 4 0 0 1 8 0M8 4.2V2.6M3.6 6.4l-1-1M12.4 6.4l1-1"/></svg><b>Morning report</b>
                  </span>

                  <span class="isl isl--live" data-live>
                    <svg viewBox="0 0 16 16"><path d="M11.8 10.4A5 5 0 0 1 5.6 4.2a5 5 0 1 0 6.2 6.2z"/></svg><b>8 min</b>
                  </span>
                  <span class="isl isl--live" data-live>
                    <span class="isl__art"></span><span class="isl__wave" data-iwave><i></i><i></i><i></i><i></i><i></i></span>
                  </span>
                  <span class="isl isl--live" data-live>
                    <svg viewBox="0 0 16 16"><circle cx="8" cy="8.8" r="5"/><path d="M8 6.2v2.6l1.8 1.1"/></svg><b>6:52</b>
                  </span>
                  <span class="isl isl--live" data-live>
                    <svg class="isl__ring" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.6"/><circle class="on" cx="8" cy="8" r="5.6" pathLength="1"/></svg><b>86</b>
                  </span>
                </div>

                <!-- Wind down: the breathing orb -->
                <div class="pane pane--wind" data-pane="0">
                  <div class="pane__in">
                    <p class="eyebrow" data-w>Tonight, 22:40</p>
                    <p class="title" data-w>Wind down</p>
                    <div class="orb" data-w>
                      <svg class="orb__ticks" data-ticks viewBox="0 0 100 100"></svg>
                      <svg class="orb__rings" viewBox="0 0 100 100"><circle cx="50" cy="50" r="38"/><circle cx="50" cy="50" r="30"/></svg>
                      <span class="orb__halo" data-halo></span>
                      <span class="orb__core" data-core></span>
                      <span class="orb__words"><b data-word>Breathe in</b><small><span data-count>4</span> s</small></span>
                    </div>
                    <div class="chips" data-w><span class="chip on">Calm</span><span class="chip">Box</span><span class="chip">Slow</span></div>
                    <span class="cta" data-w>Start session<small>8 min</small></span>
                  </div>
                  <span class="rim" data-rim></span>
                </div>

                <!-- Soundscapes: the mix that fades -->
                <div class="pane pane--sound" data-pane="1">
                  <div class="pane__in">
                    <p class="eyebrow" data-s>Playing tonight</p>
                    <p class="title" data-s>Soundscapes</p>
                    <div class="now" data-s>
                      <div class="now__top">
                        <span class="now__art"><svg viewBox="0 0 40 40"><path d="M4 30c6-4 10-4 16 0s10 4 16 0M4 22c6-4 10-4 16 0s10 4 16 0M4 14c6-4 10-4 16 0s10 4 16 0"/></svg></span>
                        <span class="now__txt"><b>Rain on a tin roof</b><small>Fades out in 45 min</small></span>
                        <span class="now__play"><svg viewBox="0 0 16 16"><path d="M5.5 3.5v9M10.5 3.5v9"/></svg></span>
                      </div>
                      <div class="wave" data-wave></div>
                      <div class="scrub"><i data-scrub></i><em data-knob></em></div>
                      <div class="scrub__t"><span>12:04</span><span>45:00</span></div>
                    </div>
                    <ul class="rows">
                      <li class="row" data-s><span class="row__ic"><svg viewBox="0 0 16 16"><path d="M2 9c2-3 4-3 6 0s4 3 6 0"/></svg></span><b>Brown noise</b><small>8 h</small></li>
                      <li class="row" data-s><span class="row__ic"><svg viewBox="0 0 16 16"><path d="M8 2.5 4 9h2.6L4.6 13.5h6.8L9.4 9H12z"/></svg></span><b>Night forest</b><small>1 h</small></li>
                      <li class="row" data-s><span class="row__ic"><svg viewBox="0 0 16 16"><path d="M2 6c2-2 4-2 6 0s4 2 6 0M2 10.5c2-2 4-2 6 0s4 2 6 0"/></svg></span><b>Ocean drift</b><small>2 h</small></li>
                    </ul>
                  </div>
                  <span class="rim" data-rim></span>
                </div>

                <!-- Smart alarm: the wake window on a dial -->
                <div class="pane pane--alarm" data-pane="2">
                  <div class="pane__in">
                    <p class="eyebrow" data-a>Wake window</p>
                    <p class="title" data-a>Smart alarm</p>
                    <div class="dial" data-a>
                      <svg viewBox="0 0 100 100">
                        <path class="dial__track" data-track/>
                        <path class="dial__win" data-win pathLength="1"/>
                        <g data-dticks></g>
                        <circle class="dial__knob" data-dknob r="3.4"/>
                      </svg>
                      <p class="dial__time"><b data-time>6:40</b><small>in light sleep</small></p>
                      <p class="dial__ends"><span>6:00</span><span>8:00</span></p>
                    </div>
                    <div class="line" data-a><span>Window</span><b>6:40 to 7:10</b></div>
                    <div class="line" data-a><span>Wake in light sleep</span><span class="toggle" data-toggle><i></i></span></div>
                    <ul class="days" data-a><li class="on">M</li><li class="on">T</li><li class="on">W</li><li class="on">T</li><li class="on">F</li><li>S</li><li>S</li></ul>
                  </div>
                  <span class="rim" data-rim></span>
                </div>

                <!-- Morning report: the night, stage by stage -->
                <div class="pane pane--report" data-pane="3">
                  <div class="pane__in">
                    <p class="eyebrow" data-r>Good morning</p>
                    <p class="title" data-r><span data-slept>7h 28m</span> asleep</p>
                    <p class="sub" data-r>23:08 to 6:50, Tuesday</p>
                    <div class="hyp" data-r>
                      <span class="hyp__lbl" style="--y:0">Awake</span>
                      <span class="hyp__lbl" style="--y:1">REM</span>
                      <span class="hyp__lbl" style="--y:2">Light</span>
                      <span class="hyp__lbl" style="--y:3">Deep</span>
                      <svg viewBox="0 0 200 130" preserveAspectRatio="none">
                        <g class="hyp__grid"><path d="M0 10H200M0 44H200M0 78H200M0 112H200"/></g>
                        <path class="hyp__area" data-harea/>
                        <path class="hyp__line" data-hline pathLength="1"/>
                      </svg>
                      <span class="hyp__scan" data-hscan></span>
                    </div>
                    <div class="tiles">
                      <span class="tile" data-r><small>Deep</small><b>1h 44m</b></span>
                      <span class="tile" data-r><small>REM</small><b>1h 38m</b></span>
                      <span class="tile tile--on" data-r><small>Score</small><b data-score>0</b></span>
                    </div>
                    <div class="week" data-r><small>This week</small><span class="week__bars" data-week><i style="--h:.62"></i><i style="--h:.78"></i><i style="--h:.55"></i><i style="--h:.84"></i><i style="--h:.7"></i><i style="--h:.9"></i><i class="on" style="--h:.86"></i></span></div>
                  </div>
                  <span class="rim" data-rim></span>
                </div>

                <span class="glass" data-glass aria-hidden="true"></span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
    <p class="sr" aria-live="polite" data-say></p>
  </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.

87 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 “Sleep app features” 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 an almost black page with fine grain and a soft lavender light behind the phone, on the left there is ‘Lull for iPhone’, the feature’s big name under it, a line that explains it and the index with the four names, Wind down, Soundscapes, Smart alarm and Morning report; on the right a phone drawn in CSS, with a dark titanium frame, side keys, the black island, a sheen on the glass and layered shadows. On arrival the words rise one after the other, the phone rises on a spring and the first screen wakes: the ticks around the orb appear in a sweep, the lavender orb is born with a small elastic and starts breathing, swelling on ‘Breathe in’, holding on ‘Hold’ and shrinking on ‘Breathe out’, with the seconds counting down; in the island the moon and ‘8 min’. Scrolling down, at each feature the island widens with a slight overshoot into the pill with the feature’s name and icon, the clock at the top fades, and the new screen pours out of the pill: its cut widens first and then drops until it covers the whole glass, with a thread of lavender light on its edge that fades as it lands, and the content slides down out of the island, smaller, and settles; meanwhile the screen before steps back, rounds its corners and darkens under a veil. Then the island narrows into the feature’s live activity. In Soundscapes the ‘Rain on a tin roof’ card with a wave of thirty moving bars, the time bar running to its point and three sounds in a row coming in from the right; in the island the five bars of the wave. In Smart alarm the 6:40 to 7:10 window draws itself on the dial’s arc, the knob runs from 6:40 to 6:52 with the time counting and a small elastic knock, the ‘Wake in light sleep’ switch flips and the days spring in; in the island the alarm and 6:52. In Morning report the stages of the night, Awake, REM, Light and Deep, draw themselves in steps with a line of light following them, the area under them fills and the score counts to 86; in the island the ring and 86. Beside it, the feature name leaves upwards and the new one rises out of the mask widening on the wdth axis and settling, the line changes with a fade, and the index pill slides to the lit name on a spring, with a lavender thread along its bottom that grows with the feature’s scroll. Scrolling back, each screen pours back into the island; a click on a name of the index takes the page to that feature.

How it works

One number for the scroll

ScrollTrigger with scrub moves a {p} object from 0 to 1 along the whole section. draw() reads p, picks the feature from the thresholds in AT and stretches the thread in the index pill with the part of p that belongs to the feature. The scroll only decides which feature shows: the change is timed, with its springs.

The screen out of the island

Every screen has a number t from 0 to 1. render() turns it into a clip-path inset(… round …) in pixels that starts from the rectangle of the island’s pill and ends on the whole glass: the width and the radius follow an expo.out, the height a power3.inOut, so the cut widens sideways first and then drops, like a drop.

The thread of light on the edge

Inside every screen a .rim box with a one pixel lavender border and an inner glow takes the same position, size and radius as the cut; its opacity falls with t, so the edge shows while the screen pours out and disappears once it has landed.

The screen before stepping back

A second number r takes the covered screen to scale 0.935, a few pixels lower, rounded corners and a black veil in a --dim variable: like an iOS screen under the new one. Going back the same numbers return to zero and the screen pours back into the island.

The island in two states

setIsland() takes the island to the wide pill with the name (62% of the screen) or to the live activity (40%), in pixels measured again on resize, with a back.out for the overshoot, and swaps the contents with a blurred fade. One timeline at a time: a new change kills the one before.

The screens waking up

wake(k) builds the screen’s timeline as it pours out: the parts rise staggered and then each does its own thing, the orb breathing on a repeating timeline, the wave on the ticker, the dial’s arc and the night’s stages with stroke-dashoffset on pathLength 1, the knob and the score counting.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the four features take: 2 is twice as long.
POURscript.js1Seconds the screen takes to pour out of the island.
SPRINGscript.js1How much the island and the index pill overshoot: 0 never.
BREATHscript.js4Seconds of the in-breath on the Wind down orb.
SCOREscript.js86The sleep score of the morning report.
GLOWscript.js1How strong the lavender light behind the phone is.

Try them in the Playground

When to use it

For the landing page of a mobile app with several features to show one at a time: the features section under the headline, where visitors scroll and watch the app change screens as on a real phone. It fits a sleep, meditation, health or wellness app, and any app that uses the dynamic island and live activities.

On phones

The same animation with adapted sizes: the phone is sized on the height and on the width (min(82vh, 660px, 96vw)) and the app inside follows in container units; beside it stay the name and the index, with the text shrinking through clamp, and below 520 pixels the explaining line hides, so it all fits in the box. The cut and the island are measured again in pixels on resize.

With reduced motion

No long scroll and no movement: the section fades in on Wind down with every screen already in its final state; a click on a name of the index changes the screen and the name with a fade.

Pitfalls

  • The island is centred with left and right at zero and auto margins, not with translateX(-50%): GSAP’s entrance with scale on the same element would wipe out the class transform and the island would jump sideways.
  • The island’s tweens (the pill with the name, then the live activity) live in one timeline that is killed at every change: with separate tweens and overwrite, the delayed second one killed the first as soon as it was made and the island stayed small.
  • The screen’s clip-path is written in pixels by render(), not tweened by GSAP: an inset in pixels with a radius does not interpolate to none, so at t equal to 1 it is removed and at 0 the screen becomes hidden, so as not to leave a one pixel thread under the island.

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 15 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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