Skip to content
animorio
IT
All components

Ski pass card

Tickets, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 6.8 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

23 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 “Ski pass card” 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

In the centre, on white, a pass with rounded corners and the lanyard slot at the top. The upper part is a blue sky that lightens downwards, with two ridges of snow, the resort’s name and on the right the number of days, large. Below the dashed tear line there are six bars, one per day: touching one, the bars up to it fill with blue one after the other with a small bounce and the last turns red; removing days they empty the other way. Meanwhile the red piste draws itself further down or climbs back up the mountain, a sheen crosses the sky, the number of days rolls, the price per day drops while counting (62 for one day, 48 for six), the label with the saving appears and the total counts inside the dark button. The button, pressed, says “Pass in your cart”.

How it works

The bars

Each 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

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 prices

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.

Values to change

NameFileDefaultWhat it changes
DAYSscript.js6The maximum number of days: one bar per day.
PICKscript.js3The days chosen at the start.
BASEscript.js62The price of a single day.
DROPscript.js4.5How much the price per day drops for each extra day, in percent.
CURRENCYscript.js€The currency symbol.
SKYscript.js#2f8fe6The colour of the sky and of the bars.
ACCENTscript.js#ff5a36The colour of the piste and of the last day.
LOOPscript.jstrueLeft alone, a pointer tries it by itself.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

No cascade, sheen or bounces: bars, piste, days and prices are at their value at once, the number of days changes with a fade.

Pitfalls

  • The bar’s lift on hover sits on the button (CSS), the fill on its child (GSAP): on the same element GSAP’s transform would erase the CSS one.
  • The sky’s sheen is slanted: the slant must be given to GSAP together with the movement (skewX), because its inline transform replaces the class’s.
  • The bars carry no numbers: the number of days is written once, large, and each bar has its own label for screen readers (“3 days”).

Libraries

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.

Testing

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