Skip to content
animorio
IT
Back to the library

Conversion funnel

SVG, ScrollGSAPMediumCompressed weight: Demo 7.6 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The results section of a made-up analytics tool, Quayline, in the clean style of product interfaces: the stage stays still and as you scroll a blue ribbon draws itself from left to right and narrows at every step, from visitors to paying customers. A dark pill rides the tip counting the people still in, the steps light up with their numbers rolling into place, a thin line peels off where people leave and the share that goes on appears above each narrowing. At the end a light sweeps the ribbon and the closing line comes in.

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>
<!--
  "Conversion funnel" 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>Quayline, where your visitors go</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>
  <!-- a made-up product analytics tool, Quayline. A sticky stage with a signup funnel: scrolling, a ribbon draws itself
       from left to right and narrows at every step, a pill rides its tip counting the people still in, the steps light
       up as the tip reaches them and the share that goes on appears under each narrowing. At the end a light sweeps
       the ribbon and the closing line comes in -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>
      <p class="occhiello">
        <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 3.5h12L9.5 9v3.5l-3 1.5V9z"/></svg>
        Quayline, last 90 days
      </p>
      <h2 class="titolo" data-titolo>Where your visitors go</h2>
      <p class="sotto">Every person who opened the site, step by step to a paid plan.</p>

      <figure class="carta" data-carta>
        <div class="carta__testa">
          <span class="carta__nome">Signup funnel</span>
          <span class="carta__periodo">Aug 1 to Oct 29</span>
        </div>
        <div class="passi" data-passi aria-hidden="true"></div>
        <div class="grafico" data-grafico>
          <svg class="grafico__svg" data-svg aria-hidden="true">
            <defs>
              <linearGradient id="nastro" x1="0" y1="0" x2="1" y2="0">
                <stop offset="0" class="nastro__a"/>
                <stop offset="1" class="nastro__b"/>
              </linearGradient>
              <linearGradient id="riflesso" x1="0" y1="0" x2="1" y2="0">
                <stop offset="0" stop-color="#fff" stop-opacity="0"/>
                <stop offset="0.5" stop-color="#fff" stop-opacity="0.55"/>
                <stop offset="1" stop-color="#fff" stop-opacity="0"/>
              </linearGradient>
              <filter id="morbida" x="-10%" y="-40%" width="120%" height="200%"><feGaussianBlur stdDeviation="9"/></filter>
              <clipPath id="taglio"><rect data-taglio x="0" y="0" width="0" height="0"/></clipPath>
              <clipPath id="forma"><path data-forma-clip/></clipPath>
            </defs>
            <rect class="banda" data-banda x="0" y="0" width="0" height="0" rx="8"/>
            <g data-colonne></g>
            <g data-perdite></g>
            <g clip-path="url(#taglio)">
              <path class="ombra" data-ombra filter="url(#morbida)"/>
              <path class="nastro" data-nastro/>
              <path class="orlo" data-orlo/>
            </g>
            <g clip-path="url(#forma)">
              <rect class="luce" data-luce x="0" y="0" width="0" height="0" fill="url(#riflesso)"/>
            </g>
            <line class="filo" data-filo x1="0" y1="0" x2="0" y2="0"/>
          </svg>
          <div class="quote" data-quote aria-hidden="true"></div>
          <div class="punta" data-punta aria-hidden="true">
            <span class="punta__corpo" data-punta-corpo><b data-valore>48,200</b> people</span>
          </div>
        </div>
      </figure>
      <p class="chiusa" data-chiusa></p>
    </div>
  </section>
  <footer class="piede">Figures are illustrative. Quayline is a made-up product.</footer>

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

24 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 “Conversion funnel” 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 warm white background there is the results section of Quayline, a made-up product analytics tool: at the top a white pill with a small drawn funnel and the words Quayline, last 90 days, then the headline Where your visitors go, still pale grey, a line of explanation and below a white card with the chart’s name, Signup funnel, and the period. Above the chart are the names of the four steps, Visited, Signed up, Activated, Paid, still faint. The stage stays still as you scroll: first the three dashed lines between the steps come in, then a blue ribbon draws itself from left to right, tall at the first step, narrowing with a soft curve at every step, with a blurred shadow under it and a thread of light on its top edge. At the tip there is a thin vertical thread and next to it a black pill counting the people still in, from 48,200 to 1,385. When the tip reaches a step its name lights up and its number rolls up from below with a small bounce; the dashed line before the step turns blue. In every narrowing a thin grey line peels off the ribbon’s bottom edge and falls away, the people who leave, and once the narrowing is behind, a pill with the share that goes on appears above the ribbon: 20% go on, 54% go on, 26.6% go on. At the end the tip’s pill fades, a band of light sweeps the ribbon from left to right, the headline goes from grey to ink as it gains weight and under the card One in 35 visitors becomes a customer comes in word by word. Scroll back up and everything pulls back.

How it works

The ribbon in pixels

The script measures the chart box and gives the SVG the same viewBox. The ribbon’s height at every x comes from a function: flat over the middle 40 per cent of each column, and a smooth curve (smoothstep) between one step and the next. The step heights are the square root of the share of people, so the last step, 3 per cent, is still visible.

The tip

The scroll drives a value from 0 to 1; the ribbon is revealed by a clipPath whose width is the tip’s x. The pill’s number uses the same curve, on a geometric scale between steps, so it drops fast where the ribbon narrows.

The thresholds

Steps, shares, lines and the closing are switches: when the tip passes a threshold a small GSAP animation starts, and scrolling back plays the opposite one. The step number rolls up from below its window with back.out, the share comes in with a bounce.

The people who leave

In every narrowing a path starts from the ribbon’s bottom edge and falls to the bottom; its length is revealed with stroke-dashoffset along with the tip.

The closing

Past 90 per cent of the scroll, a band with a white gradient, clipped to the ribbon’s shape, crosses it in 1.4 seconds; the headline takes colour and weight and the closing line comes in word by word.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole funnel takes: 2 is twice as long.
VISITORSscript.js48200The people who opened the site, the first step.
SIGNUP_RATEscript.js20The percentage of visitors who sign up.
ACTIVATION_RATEscript.js54The percentage of sign ups who finish the setup.
PAID_RATEscript.js26.6The percentage of active accounts who pay.
SCRUBscript.js0.6How far the funnel lags behind the scroll, in seconds.
SHINEscript.js0.55How bright the light sweeping the ribbon at the end is (0 none).

Try them in the Playground

When to use it

For the results section of a software landing page, a report or a case study: whoever scrolls sees people move from step to step and understands where they are lost, instead of reading four numbers in a row.

On phones

The same animation with adapted sizes: headline, card and chart are sized on height too and all fit in the stage; step names and numbers get smaller, and the tip’s pill never leaves the card.

With reduced motion

No motion: the funnel is already fully drawn, with the four numbers, the three shares, the lines of the people who leave, the headline lit and the closing line.

Pitfalls

  • The viewBox is always as big as the box in pixels and is rebuilt on resize: with a stretched viewBox the HTML pills above the ribbon would not land in place.
  • With heights proportional to people the last step would be a one pixel thread: the square root of the share keeps the order and leaves everything visible.
  • The tip’s pill rests to the right of the tip, not centred: centred, it would cover the shares that just appeared.

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

Testing

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