
The star rating
Ratings, SVG, Hover
The ski pass in a ski resort’s shop: a pass with a blue sky, the snowy ridge and below six bars, one per day. Choosing more days the bars fill one after the other, the red piste draws itself further down the mountain, the price per day drops while counting, the total rolls in the button and the saving appears.
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>
<!--
"Ski pass card" 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>Ski pass card with the days to choose and the price per day that drops</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>
<main class="stage">
<!-- the ski pass of a resort's shop: the bars choose how many days; with each day added the bars fill one after
the other, the piste draws itself further down the ridge, the price per day drops and the total rolls -->
<article class="pass" data-pass>
<header class="pass__top">
<span class="pass__slot" aria-hidden="true"></span>
<svg class="pass__ridge" viewBox="0 0 300 140" preserveAspectRatio="none" aria-hidden="true">
<defs>
<linearGradient id="snow" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#cfe6fb"></stop></linearGradient>
</defs>
<path class="ridge ridge--far" d="M0 104 38 78 62 92 104 52 138 84 170 66 214 96 252 70 300 98V140H0Z"></path>
<path class="ridge ridge--near" fill="url(#snow)" d="M0 122 44 100 76 112 128 74 160 100 196 86 236 112 270 98 300 110V140H0Z"></path>
<path class="piste" data-piste pathLength="1" d="M128 75c5 7-8 10-3 17s14 5 12 12-18 7-20 14 9 9 16 14"></path>
</svg>
<span class="pass__sheen" data-sheen aria-hidden="true"></span>
<div class="pass__brand"><strong>Alta Cresta</strong><span>Ski pass, all lifts</span></div>
<div class="pass__days" aria-hidden="true"><span class="roll"><span data-n>3</span></span><small data-unit>days</small></div>
</header>
<div class="pass__cut" aria-hidden="true"></div>
<div class="pass__body">
<div class="segs" role="radiogroup" aria-label="How many days" data-segs></div>
<div class="row">
<p class="per"><span class="per__n"><span data-cur>€</span><span data-per>55</span></span><small>per day</small></p>
<span class="save" data-save>Save €21</span>
</div>
<button class="cta" type="button" data-cta><span class="cta__word"><span data-word>Get the pass</span></span><span class="cta__tot" data-tot>€165</span></button>
</div>
</article>
<p class="sr" data-live aria-live="polite"></p>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>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.
23 values to change
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 “Ski pass card” from Animorio and fit it into my siteEach day is a real button (role radio inside a radiogroup, arrow keys) holding a coloured layer that goes from scaleY 0 to 1 with its origin at the bottom and back.out. Each bar’s delay depends on the direction: adding days the cascade climbs from the old one to the new one, removing them it goes down.
The piste is an SVG path with pathLength 1: its stroke-dashoffset goes to 1 minus days over maximum days, with power3.out. The SVG is stretched with preserveAspectRatio none, so the stroke uses vector-effect: non-scaling-stroke to keep the same thickness.
The price per day is BASE minus DROP percent for each extra day; total and saving come from the same number. The digits count with power2.out and Math.round, no spring: a price must not go past its value and come back.
| Name | File | Default | What it changes |
|---|---|---|---|
DAYS | script.js | 6 | The maximum number of days: one bar per day. |
PICK | script.js | 3 | The days chosen at the start. |
BASE | script.js | 62 | The price of a single day. |
DROP | script.js | 4.5 | How much the price per day drops for each extra day, in percent. |
CURRENCY | script.js | € | The currency symbol. |
SKY | script.js | #2f8fe6 | The colour of the sky and of the bars. |
ACCENT | script.js | #ff5a36 | The colour of the piste and of the last day. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
For the online shop of a ski resort, a mountain hotel or a ski school, and for any ticket that costs less per day when taken for more days: festival passes, museum passes, rentals. In a real product the prices come from the price list and the button leads to the cart.
The same pass, at most as wide as the screen minus the margins and with the sky part measured on the height too; the bars are touched with a finger, and there is no lift on hover.
No cascade, sheen or bounces: bars, piste, days and prices are at their value at once, the number of days changes with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.8 KB; the libraries: GSAP 28 KB.
Tested on 15 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.