Skip to content
animorio
IT
Back to the library

Phone feature scroll

ScrollGSAP, CSS onlyMediumCompressed weight: Demo 8.7 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The features section of an app, in the clean style of product interfaces: four features on the left, a still phone on the right. As you scroll the active feature lights up, a thin rail beside the texts fills and the screen changes in a different way each time: it slides in from the side, cross-fades with a zoom, a bottom card grows until it becomes the whole screen; and inside each screen the interface plays, the list of days, the chart, the route on the map, the confirmation tick.

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>
<!--
  "Phone feature scroll" 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>Waypost 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 trip planner, Waypost. The stage sticks while you scroll: four feature texts
       on the left take turns lighting up while a thin rail fills beside them, and the phone on the right changes
       screen with a different clean transition each time: a slide, a cross-fade with zoom, a card that grows into
       the whole screen. Each screen plays its little interface once: a list, a chart, a route, a confirmation -->
  <main>
    <section class="corsa" data-corsa>
      <div class="palco" data-palco>
        <div class="testi">
          <p class="testi__nota">Waypost for travellers</p>
          <div class="testi__corpo">
            <div class="binario" aria-hidden="true"><span class="binario__pieno" data-binario></span></div>
            <ol class="passi" data-passi>
              <li class="passo" data-passo>
                <h3 class="passo__titolo">Plan every day</h3>
                <p class="passo__riga">Drop in the places you love and Waypost turns them into a day by day plan.</p>
              </li>
              <li class="passo" data-passo>
                <h3 class="passo__titolo">Keep the budget honest</h3>
                <p class="passo__riga">Every booking and every coffee lands in one running total.</p>
              </li>
              <li class="passo" data-passo>
                <h3 class="passo__titolo">Walk the best route</h3>
                <p class="passo__riga">Routes between stops, timed for the way you actually move.</p>
              </li>
              <li class="passo" data-passo>
                <h3 class="passo__titolo">Book it in one tap</h3>
                <p class="passo__riga">Tickets, rooms and tables confirmed without leaving the trip.</p>
              </li>
            </ol>
          </div>
        </div>

        <div class="telefono-posto">
          <div class="telefono" data-telefono>
            <span class="telefono__tasto telefono__tasto--a" aria-hidden="true"></span>
            <span class="telefono__tasto telefono__tasto--b" aria-hidden="true"></span>
            <div class="vetro" data-vetro>
              <div class="barra-stato" aria-hidden="true"><span>9:41</span><span class="isola"></span><span class="barra-stato__segni"><i></i><i></i><i></i></span></div>

              <!-- screen 1: the day by day plan -->
              <section class="schermo schermo--piano" data-schermo>
                <header class="sch-testa">
                  <p class="sch-nota">Lisbon trip</p>
                  <h4 class="sch-titolo">4 days, 11 stops</h4>
                </header>
                <ul class="giorni">
                  <li class="giorno" data-riga><span class="giorno__data">Fri<b>24</b></span><span class="giorno__testo"><b>Alfama walk</b><em>3 stops · 2h 40m</em></span><svg class="giorno__ok" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-6.5" pathLength="1"/></svg></li>
                  <li class="giorno" data-riga><span class="giorno__data">Sat<b>25</b></span><span class="giorno__testo"><b>Belém and the river</b><em>4 stops · 5h</em></span><svg class="giorno__ok" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-6.5" pathLength="1"/></svg></li>
                  <li class="giorno" data-riga><span class="giorno__data">Sun<b>26</b></span><span class="giorno__testo"><b>Sintra day trip</b><em>2 stops · 7h</em></span><svg class="giorno__ok" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-6.5" pathLength="1"/></svg></li>
                  <li class="giorno" data-riga><span class="giorno__data">Mon<b>27</b></span><span class="giorno__testo"><b>Markets and home</b><em>2 stops · 3h</em></span><svg class="giorno__ok" viewBox="0 0 16 16"><path d="M3.5 8.5l3 3 6-6.5" pathLength="1"/></svg></li>
                  <li class="giorno giorno--nuovo" data-riga><svg class="giorno__piu" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.5v9M3.5 8h9"/></svg><span>Add a place</span></li>
                </ul>
              </section>

              <!-- screen 2: the running budget -->
              <section class="schermo schermo--soldi" data-schermo>
                <header class="sch-testa">
                  <p class="sch-nota">Spent so far</p>
                  <h4 class="sch-titolo sch-titolo--cifra" data-totale>€1,240</h4>
                  <p class="sch-sotto">of €1,600 · on track</p>
                  <span class="metro"><i data-metro></i></span>
                </header>
                <div class="barre" data-barre>
                  <span class="barra" style="--h:.42"><i></i><em>F</em></span>
                  <span class="barra" style="--h:.74"><i></i><em>S</em></span>
                  <span class="barra barra--su" style="--h:.96"><i></i><em>S</em></span>
                  <span class="barra" style="--h:.38"><i></i><em>M</em></span>
                  <span class="barra" style="--h:.55"><i></i><em>T</em></span>
                </div>
                <ul class="spese">
                  <li data-spesa><span>Tram 28, two tickets</span><b>€6.00</b></li>
                  <li data-spesa><span>Pastéis, a box of six</span><b>€7.20</b></li>
                  <li data-spesa><span>Fado night, two seats</span><b>€44.00</b></li>
                </ul>
              </section>

              <!-- screen 3: the walking route -->
              <section class="schermo schermo--strada" data-schermo>
                <svg class="mappa" viewBox="25 0 150 300" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
                  <g class="mappa__isolati">
                    <rect x="8" y="10" width="70" height="52" rx="6"/><rect x="88" y="10" width="104" height="36" rx="6"/>
                    <rect x="8" y="72" width="40" height="80" rx="6"/><rect x="58" y="72" width="62" height="50" rx="6"/>
                    <rect x="130" y="56" width="62" height="70" rx="6"/><rect x="58" y="132" width="134" height="40" rx="6"/>
                    <rect x="8" y="162" width="40" height="70" rx="6"/><rect x="58" y="182" width="70" height="60" rx="6"/>
                    <rect x="138" y="182" width="54" height="96" rx="6"/><rect x="8" y="242" width="120" height="48" rx="6"/>
                  </g>
                  <path class="mappa__fiume" d="M-10 268 C 40 250, 90 290, 140 262 S 200 250, 220 240"/>
                  <path class="mappa__strada-fondo" d="M84 67 L53 67 L53 127 L125 127 L125 177 L133 177 L133 206"/>
                  <path class="mappa__strada" data-strada pathLength="1" d="M84 67 L53 67 L53 127 L125 127 L125 177 L133 177 L133 206"/>
                  <g class="mappa__spillo" data-spillo-a transform="translate(84 67)"><path d="M0 0 C-7 -8 -8 -11 -8 -14 A8 8 0 1 1 8 -14 C8 -11 7 -8 0 0Z"/><rect x="-3" y="-17" width="6" height="6" rx="2"/></g>
                  <g class="mappa__spillo mappa__spillo--fine" data-spillo-b transform="translate(133 206)"><path d="M0 0 C-7 -8 -8 -11 -8 -14 A8 8 0 1 1 8 -14 C8 -11 7 -8 0 0Z"/><rect x="-3" y="-17" width="6" height="6" rx="2"/></g>
                </svg>
                <div class="foglio" data-foglio>
                  <p class="foglio__tempo"><b>38 min</b> walk · 2.6 km</p>
                  <p class="foglio__via">Miradouro to Time Out Market</p>
                  <span class="foglio__tasto" data-foglio-tasto>Book a table</span>
                </div>
              </section>

              <!-- screen 4: the booking confirmed -->
              <section class="schermo schermo--fatto" data-schermo>
                <div class="fatto" data-fatto>
                  <svg class="fatto__segno" viewBox="0 0 48 48" aria-hidden="true"><circle class="fatto__anello" cx="24" cy="24" r="20" pathLength="1"/><path class="fatto__spunta" d="M15 25l6 6 12-13" pathLength="1"/></svg>
                  <h4 class="fatto__titolo">Table booked</h4>
                  <p class="fatto__riga">Time Out Market · Sat 25, 8:30 pm</p>
                  <ul class="fatto__righe">
                    <li data-voce><span>Guests</span><b>2</b></li>
                    <li data-voce><span>Walk from here</span><b>38 min</b></li>
                    <li data-voce><span>Added to</span><b>Day 2</b></li>
                  </ul>
                  <span class="fatto__tasto" data-voce>View Day 2</span>
                </div>
              </section>
            </div>
          </div>
        </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.

71 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 “Phone feature scroll” 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 very light grey background is the features section of Waypost, a made-up app for planning trips: on the left four features, each with a title and a grey line (“Plan every day”, “Keep the budget honest”, “Walk the best route”, “Book it in one tap”), with a thin vertical rail beside them; on the right a phone drawn in CSS, with side keys, the island at the top and a reflection on the glass. As you scroll the stage stays put: the active feature turns black and shifts by a hair, the others fade, and the rail fills from the top. In the phone the first screen is the Lisbon trip: the four days come in one after the other with a small bounce and each draws its tick. At the second feature the phone turns a few degrees and the budget slides in from the right while the list steps back: the daily bars rise one after the other (a single taller one, teal), the total counts up to “€1,240” and the latest expenses appear. At the third the map cross-fades in with a zoom: the first pin drops, the route draws itself between the blocks and along the river, the second pin drops and the card with “38 min walk” and the “Book a table” button rises from the bottom. At the fourth the button is pressed and the card grows until it fills the whole screen, teal: the ring and the tick draw themselves and “Table booked” and the details come in below. Scroll back up and everything plays back. On the phone the phone sits on top and one feature at a time is read underneath, with the rail lying horizontal.

How it works

A still stage and a paused timeline

The section is as tall as the four features need (100vh plus 75vh per feature, times RIDE) and inside it the stage is sticky and 100vh tall. Everything that happens lives in a single paused timeline, one feature per second of timeline; a tween drives its progress from 0 to 1 with the section’s ScrollTrigger and scrub, and Lenis does the smooth scrolling. Never once: true on the timeline.

The active text and the rail

At each second of the timeline the right feature goes to opacity 1 and the others to 0.32; the rail beside the texts is a child inside a thin track, filled with scaleY from the top along the whole timeline (with scaleX on the phone, where it lies horizontal).

Three different transitions

The screens sit on top of each other inside the glass, which hides its overflow. The second comes in with xPercent from 100 to 0 while the first steps back to -28; the third comes in with opacity and scale from ZOOM to 1 while the second shrinks slightly; the fourth starts from an inset() clip-path with the pixel measurements of the bottom card and grows to the whole glass, the corners following.

The interface that plays once

Inside each screen the pieces have their own fromTo with immediateRender: false, placed right after the change: the rows with a small back.out, the ticks and the route with stroke-dashoffset on pathLength 1, the bars with scaleY from the bottom, the total with an object that counts and writes the text on every update.

The phone that turns

At each change the phone rotates TILT degrees around the vertical axis inside a container with perspective, rises 6 pixels and comes back with back.out: a small movement that makes the change felt without distracting.

Sizes on resize

The card’s clip depends on the phone’s size, and the phone is measured in vh: on resize the timeline is rebuilt with the previous progress and ScrollTrigger refreshes.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the four features take: 2 is twice as long.
SCRUBscript.js0.6How far the phone lags behind the scroll, in seconds: 0 ties it to your finger.
ZOOMscript.js1.12How close the map starts during its cross-fade: 1 means no zoom.
TILTscript.js6How many degrees the phone turns at each screen change: 0 keeps it still.

Try them in the Playground

When to use it

For the features section of the landing page of an app or a SaaS product: instead of a grid of icons, each feature tells itself with its real screen as you scroll, and the reader sees the product in use.

On phones

The same animation with adapted sizes: the phone goes on top, smaller, and one feature at a time is read underneath, fading in and out; the rail turns horizontal and the note at the top is hidden, so everything fits in the box.

With reduced motion

Every screen is already complete; as you scroll the screens and the features only cross-fade, with no movement or zoom, and the rail follows the scroll.

Pitfalls

  • The clip-path of the growing card is in pixels, measured inside the glass: it has to be recomputed on resize, otherwise with another window height the card starts from the wrong place.
  • The card has to be measured where it rests: measured while it is still pushed down for its entrance, the clip starts lower than the real card. Put it in place before measuring.
  • Every fromTo inside the timeline has immediateRender: false, and the start states are set with gsap.set: otherwise the later screens’ fromTo write their values at once and the first screen already looks covered.
  • The screens that slide in from the side go outside the phone: it is the glass, with hidden overflow and its border-radius, that cuts them.
  • The rail fills with scaleY on a child, not with a percentage height: GSAP does not read percentages back from the CSS.

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

Testing

Tested on 25 October 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