Skip to content
animorio
IT
Back to the library

Fundraising milestones

SVG, ScrollGSAP, CSS onlyMediumCompressed weight: Demo 13 KBGSAP 28 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The campaign card of a made-up tree planting charity, Grovewell: as you scroll, a thin SVG line (the running total of the gifts from February to July) draws itself through the four milestones, 25, 50, 75 and 100 %, each with its amount and date. Each milestone springs open when the line reaches it, the total at the top rolls like an odometer, a small glass tag with the date rides the tip of the line and at the end the full milestone opens into a thank you. A premium interface piece on a dark background, in the minimal style: one gesture, one green accent.

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>
<!--
  "Fundraising milestones" 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>Grovewell, the Riverbank Grove campaign</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/opsz-italic.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the campaign card of a made-up tree planting charity, Grovewell: a thin line, the running total of the gifts,
       draws itself with the scroll through four milestones; each one springs open when the line reaches it, the total
       at the top rolls like an odometer, a small glass tag rides the tip of the line with the date, and the last
       milestone opens into a thank you. -->
  <div class="track" data-track>
    <div class="stage">
      <article class="card" data-card aria-label="Riverbank Grove campaign">
        <span class="card__grain" aria-hidden="true"></span>
        <span class="card__light" aria-hidden="true"></span>

        <header class="head">
          <p class="brand">
            <svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
              <path d="M12 21V9.5"/>
              <path d="M12 13.2c-3.6 0-6.2-2.4-6.2-6.4 3.8 0 6.2 2.5 6.2 6.4Z"/>
              <path d="M12 10.4c0-3.6 2.3-6 5.8-6 0 3.5-2.3 6-5.8 6Z"/>
            </svg>
            <span class="brand__name">Grovewell</span>
            <span class="brand__sub">Riverbank Grove</span>
          </p>
          <p class="state" data-state>
            <span class="state__word state__word--live" data-live>Live campaign</span>
            <span class="state__word state__word--done" data-done>Funded</span>
          </p>
        </header>

        <section class="total" aria-live="off">
          <p class="total__label">Raised for 40,000 native trees</p>
          <div class="total__row">
            <p class="total__amount" data-amount><span class="total__cur">$</span><span class="total__reels" data-reels></span></p>
            <div class="total__side">
              <p class="total__pct" data-pct>0%</p>
              <p class="total__meta"><span>of $120,000</span><span><b data-donors>0</b> donors</span></p>
            </div>
          </div>
        </section>

        <div class="chart" data-chart>
          <svg class="chart__svg" data-svg aria-hidden="true">
            <defs>
              <linearGradient id="gw-area" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" stop-color="var(--accent)" stop-opacity="0.22"/>
                <stop offset="1" stop-color="var(--accent)" stop-opacity="0"/>
              </linearGradient>
              <linearGradient id="gw-line" x1="0" y1="0" x2="1" y2="0">
                <stop offset="0" stop-color="var(--accent)" stop-opacity="0.35"/>
                <stop offset="0.6" stop-color="var(--accent)" stop-opacity="1"/>
                <stop offset="1" stop-color="#e9fff0" stop-opacity="1"/>
              </linearGradient>
              <filter id="gw-glow" x="-20%" y="-40%" width="140%" height="180%">
                <feGaussianBlur stdDeviation="5"/>
              </filter>
              <clipPath id="gw-clip"><rect data-cliprect x="0" y="0" width="0" height="0"/></clipPath>
            </defs>
            <g data-guides></g>
            <path class="chart__area" data-area clip-path="url(#gw-clip)" fill="url(#gw-area)"/>
            <path class="chart__ghost" data-ghost/>
            <path class="chart__glow" data-glow filter="url(#gw-glow)"/>
            <path class="chart__line" data-line stroke="url(#gw-line)"/>
            <g data-nodes></g>
            <g class="tip" data-head>
              <circle class="tip__halo" r="9"/>
              <circle class="tip__core" r="3.5"/>
            </g>
          </svg>
          <div class="chart__labels" data-labels></div>
          <div class="chart__months" data-months></div>
          <div class="tag" data-tag>
            <div class="tag__in" data-tagin>
              <svg class="tag__leaf" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 13C3 7 7 3 13 3c0 6-4 10-10 10Z"/><path d="M3 13 9 7"/></svg>
              <span class="tag__date" data-date>Feb 1</span>
            </div>
          </div>
          <p class="hint" data-hint>
            <span>Scroll to follow the campaign</span>
            <svg viewBox="0 0 12 12" aria-hidden="true"><path d="M3 4.5 6 7.5l3-3"/></svg>
          </p>

          <div class="thanks" data-thanks aria-hidden="true">
            <span class="thanks__rings" aria-hidden="true"></span>
            <svg class="thanks__mark" viewBox="0 0 48 48" aria-hidden="true">
              <circle class="thanks__ring" data-tring cx="24" cy="24" r="22"/>
              <path class="thanks__stem" data-tdraw d="M24 36V20"/>
              <path class="thanks__leaf" data-tdraw d="M24 27.5c-5.6 0-9.4-3.6-9.4-9.6 5.8 0 9.4 3.8 9.4 9.6Z"/>
              <path class="thanks__leaf" data-tdraw d="M24 22.6c0-5.4 3.4-9 8.8-9 0 5.2-3.4 9-8.8 9Z"/>
            </svg>
            <p class="thanks__eyebrow" data-tin>Goal reached on July 21</p>
            <h2 class="thanks__title" data-tin>Thank you.</h2>
            <p class="thanks__text" data-tin>2,184 people funded 40,000 native trees along the river. Planting starts in October.</p>
            <a class="go" href="#" data-tin data-go>
              <span class="go__fill" aria-hidden="true"></span>
              <span class="go__text">Follow the planting</span>
              <svg class="go__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4l4 4-4 4"/></svg>
            </a>
          </div>
        </div>
      </article>
    </div>
  </div>

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

35 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 “Fundraising milestones” 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 near black page with a dark green light behind it sits a card with fine grain, a one pixel edge that catches the light and a three layer shadow. At the top the Grovewell mark (a three stroke sapling) with ‘Riverbank Grove’ and the ‘Live campaign’ pill; below, ‘Raised for 40,000 native trees’, the big total, the share in a green pill and, on the right, ‘of $120,000’ and the donors. The rest is the chart: four dashed guides with 25 %, 50 %, 75 % and 100 % on the left, the months from Feb to Jul below, the road of the line already dotted in and four empty rings with the amount and date in grey ($30,000 on March 4, $60,000 on April 18, $90,000 on June 2, $120,000 on July 21). On arrival the card rises with a hint of bounce and its parts follow in a cascade. As you scroll, the line draws itself with a green gradient and a soft glow, the area under it fills, and a frosted glass tag with a leaf and the date of the day rides its tip, leaning a little with the speed of the scroll. The total rolls on reels, digit by digit like an odometer, and the extra digits open when they are needed; donors and share follow it. When the tip touches a milestone, the core pops on a spring, the ring widens and settles on an elastic, one circle spreads once and fades, a dashed tick drops to the axis, the guide and its share turn green and the label rises and lights up; the total and the pill give a small jolt. Near the last milestone the tag steps aside; at the bottom the full milestone opens into a circle that grows from its own node and covers the chart: the sapling draws itself, then ‘Goal reached on July 21’, ‘Thank you.’ in italics and the green ‘Follow the planting’ button, while the pill at the top turns into ‘Funded’. Scrolling back up closes it all again and the milestones go out.

How it works

The chart built in pixels

The data are nine pairs of day and share of the goal. On resize the script measures the box, sets the viewBox to its pixels and runs a monotone cubic (Fritsch-Carlson) through the points: the curve never dips below a point and has no humps, like a real total. A test path measures the length up to each milestone.

The line that follows the scroll

The page progress, damped in gsap.ticker (FOLLOW), becomes the drawn share: stroke-dashoffset of the line and its glow, getPointAtLength for the tip, a clipPath that reveals the area up to the tip. The tip's y gives the total, its x the day on the tag.

Milestones on a spring

Each milestone has a paused timeline: the core on back.out, the ring to 1.5 then elastic.out, the circle that spreads once, the tick that drops, the label that rises. When the drawn length passes its own, the timeline plays; going back it rewinds at twice the speed.

The total on reels

Every digit is a reel with 0-9 and an extra 0: it chases its digit the shortest way (five steps at most, even from 9 to 0) with exponential damping (ROLL). The extra digits open in width when the total passes 10,000 and 100,000. Sizes are taken after document.fonts.ready and with offsetWidth, not from the transformed box.

The thank you that grows from the node

Past OPEN_AT, with every milestone lit, a clip-path circle() grows from the 100 % node to the farthest corner of the chart (expo.inOut), the sapling draws itself with stroke-dashoffset and the lines rise in a cascade. Centre and radius are worked out again on resize.

Values to change

NameFileDefaultWhat it changes
GOALscript.js120000The campaign goal in dollars: every milestone is a share of it.
DONORSscript.js2184How many people have given by the end.
SCREENSscript.js4.2How many screens of scroll the whole campaign takes.
FOLLOWscript.js7How quickly the line catches up with the scroll: lower is lazier.
SPRINGscript.js1.8How far a milestone overshoots when the line reaches it.
RIPPLEscript.js26How far the ring of a milestone spreads, once, in pixels.
ROLLscript.js16How quickly the reels of the total reach their digit.
TAG_LEANscript.js1How much the date tag leans with the scroll speed; 0 keeps it upright.
OPEN_ATscript.js0.9At which share of the scroll the last milestone opens into the thank you.
LINE_WIDTHscript.js1.6The thickness of the line, in pixels.

Try them in the Playground

When to use it

For a fundraising, charity or crowdfunding page, the annual report of a nonprofit, the results page of a product or a startup (users, revenue, milestones): when the numbers should tell a road travelled, one milestone at a time, and the end deserves a thank you.

On phones

The same animation with adapted sizes: the card takes almost the whole screen, the total and the words are sized on the height too, the campaign name hides, the share sits above the donors and the chart narrows, working out curve, milestones and months again in pixels.

With reduced motion

No springs and no movement: the line follows the scroll without lag (it is the data), the milestones light up with a fade, the reels jump to the digit, the tag does not lean, the thank you fades in instead of the growing circle.

Pitfalls

  • A plain spline (Catmull-Rom) makes humps between points and the total would seem to go down: a monotone cubic is needed.
  • Measuring the digits with getBoundingClientRect also takes in the scale of the jolt or the entrance: the reels stop halfway through a digit. Measure with offsetWidth and the computed height.
  • The date tag on the tip covers the label of the last milestone: near it, it fades with the distance.
  • A milestone going out on the way back is rewound, not rebuilt: the paused timeline plays forward and back.

Libraries

GSAP 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

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

Testing

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