Skip to content
animorio
IT
All components

Massage pressure

Pickers, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 6.6 KBGSAP 28 KBFreeDownload the zip

The pressure selector for a spa massage, in a card on white: four levels, Light, Medium, Firm and Deep, and above them a warm basalt stone resting on a soft surface. With each choice the stone lifts a touch and sinks as deep as the pressure, the surface bends and settles on a spring and the contour lines light up below, one more with each step. The stone sways slowly like a kneading hand; hold a finger on the surface and it sinks a little further.

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>
<!--
  "Massage pressure" 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>Massage pressure</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 pressure of a spa massage: four levels, a warm stone sinking into a soft surface as deep as the
         pressure chosen, and the contour lines under it lighting up one by one -->
    <section class="mp" data-mp aria-label="Massage pressure">
      <header class="mp__head">
        <div class="mp__what"><strong>Massage pressure</strong><span>Back and shoulders, 50 min</span></div>
        <span class="mp__meter" aria-hidden="true"><i data-bar></i><i data-bar></i><i data-bar></i><i data-bar></i></span>
      </header>

      <div class="mp__pad" data-pad>
        <svg class="mp__svg" viewBox="0 0 300 124" aria-hidden="true">
          <defs>
            <radialGradient id="mp-stone" cx="38%" cy="26%" r="80%"><stop offset="0" stop-color="#6a625c"></stop><stop offset="0.55" stop-color="#3a3531"></stop><stop offset="1" stop-color="#1d1a18"></stop></radialGradient>
            <radialGradient id="mp-shade" cx="50%" cy="50%" r="50%"><stop offset="0" stop-color="#2a1c14" stop-opacity="0.5"></stop><stop offset="1" stop-color="#2a1c14" stop-opacity="0"></stop></radialGradient>
          </defs>
          <path class="mp__body" data-body></path>
          <path class="mp__iso" data-iso></path>
          <path class="mp__iso" data-iso></path>
          <path class="mp__iso" data-iso></path>
          <path class="mp__iso" data-iso></path>
          <ellipse class="mp__shade" data-shade cx="150" cy="46" rx="40" ry="7" fill="url(#mp-shade)"></ellipse>
          <path class="mp__skin" data-skin></path>
          <g data-stone>
            <ellipse cx="0" cy="0" rx="30" ry="17" fill="url(#mp-stone)"></ellipse>
            <path class="mp__vein" d="M-21 -3.500C-12 -8 -2 -4.500 6 -8.500S19 -9 23 -5"></path>
            <path class="mp__vein mp__vein--b" d="M-12 7.500C-4 5 4 9 13 6"></path>
            <ellipse class="mp__gloss" cx="-9" cy="-9" rx="11" ry="3.200" transform="rotate(-9 -9 -9)"></ellipse>
          </g>
        </svg>
      </div>

      <div class="mp__seg" role="radiogroup" aria-label="Pressure" data-seg>
        <span class="mp__thumb" data-thumb></span>
        <button type="button" class="mp__opt" role="radio" data-opt data-feel="Gentle and flowing" data-for="To switch off and unwind"><span>Light</span></button>
        <button type="button" class="mp__opt" role="radio" data-opt data-feel="Steady and warming" data-for="For everyday tension"><span>Medium</span></button>
        <button type="button" class="mp__opt" role="radio" data-opt data-feel="Strong, slow strokes" data-for="For tight shoulders and back"><span>Firm</span></button>
        <button type="button" class="mp__opt" role="radio" data-opt data-feel="Slow and intense" data-for="For knots that won’t let go"><span>Deep</span></button>
      </div>

      <div class="mp__info">
        <strong class="mp__clip mp__clip--tall"><span data-outfeel>Steady and warming</span></strong>
        <span class="mp__clip"><span data-outfor>For everyday tension</span></span>
      </div>
      <p class="mp__note">Your therapist starts here. Ask to change it at any time.</p>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.

19 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Massage pressure” 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 white, a rounded card: at the top “Massage pressure”, “Back and shoulders, 50 min” and on the right four small bars of growing height, lit in terracotta up to the chosen level. Below, a sand-coloured panel: a dark line is the surface, with a soft hollow in the middle where a dark, glossy basalt stone rests, with two pale veins and its shadow; under the surface four thin terracotta lines repeat the hollow, wider and shallower each time. Then the four-way control, Light, Medium, Firm, Deep, with a white pill under the chosen one, and two lines: “Steady and warming”, “For everyday tension”. At the bottom a note: your therapist starts here. Tapping a level the pill slides with a small bounce, the stone lifts a touch, comes down and settles on a spring; the hollow gets deeper and wider, the lines below light up one after another, the bars grow and the two lines roll. The stone sways slowly sideways, more at the stronger levels. Holding a finger on the panel the stone sinks a little further and, on release, springs back. The arrow keys move from one level to the next.

How it works

A single number

The whole drawing comes from one number, how deep the hollow is: the surface line, the fill, the four curves below, the stone’s place and its shadow.

The same curve, five times

Surface and contour lines are the same function: each curve further down is wider and shallower, and its opacity says whether that step has been reached.

Lift, then sink

Before going down the stone rises four pixels: the anticipation turns the descent into a gesture. The landing is a spring, and the stone flattens slightly.

The measured pill

The pill’s place and width are read from the chosen option and read again on resize and when the fonts arrive.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#b8654aThe colour of pressure: the curves under the stone and the bars.
STARTscript.js2The level chosen at the start: 1 Light, 2 Medium, 3 Firm, 4 Deep.
DEPTHscript.js30How many pixels the stone sinks at the strongest level.
KNEADscript.jstrueThe stone moves slowly like a kneading hand.
LOOPscript.jstrueLeft alone, the demo’s pointer tries the levels and presses on the stone.

Try them in the Playground

When to use it

In the treatment booking of a spa, spa hotel or massage studio site or app, where guests say in advance how they like to be treated; the same control carries the firmness of a mattress, the intensity of a workout, the roast of a coffee or the strength of a massage chair.

On phones

The card is at most 348 pixels wide and about 345 tall. The drawing narrows with the card keeping its proportions; the four options are 34 pixels tall inside a 40-pixel control, each a quarter of the row.

With reduced motion

No springs or sway: the stone and the hollow appear already at the chosen level, the pill and the texts change in one step. The demo’s pointer does not start.

Pitfalls

  • The level is not told by the drawing alone: the options are a radio group with `aria-checked`, and the choice is announced to screen readers with its name and feel.
  • The stone moves by writing the SVG group’s `transform` attribute from an animated number: with GSAP’s `transformOrigin` on an SVG element the pivot would be measured on its box.
  • The pill is measured in pixels: without measuring it again on resize it stays under the wrong option when the card narrows.
  • The sway uses the same drawing as the choice: add it to the depth number, do not animate it apart, or the two movements cancel each other.
  • Treatment, length and phrases are invented.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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