Skip to content
animorio
IT
Back to the library

Blood pressure reading

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.2 KBGSAP 28 KBFreeDownload the zip

A blood pressure reading on a dark card: press “Measure” and the column rises as the cuff pumps up, then comes down slowly; the beats appear on the trace, tallest halfway, the heart pulses with them, and the two marks for systolic and diastolic stay on the column. At the end the two values, the pulse and the category’s name.

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>
<!--
  "Blood pressure reading" 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>Blood pressure reading</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">
    <!-- a blood pressure reading: the cuff pumps up, then lets the pressure down slowly while the pulse
         shows on the trace; the two values are caught on the column and the reading gets its name -->
    <section class="bp" data-bp aria-label="Blood pressure">
      <header class="bp__head">
        <span class="bp__title">Blood pressure</span>
        <span class="bp__state"><span data-state>Ready</span></span>
      </header>

      <div class="bp__body">
        <svg class="bp__col" data-col viewBox="0 0 64 150" aria-hidden="true">
          <rect class="col__bed" x="8" y="4" width="12" height="142" rx="6"></rect>
          <clipPath id="bp-col"><rect x="8" y="4" width="12" height="142" rx="6"></rect></clipPath>
          <rect class="col__fill" data-fill x="8" y="146" width="12" height="0" clip-path="url(#bp-col)"></rect>
          <g data-ticks></g>
          <g class="col__mark" data-sys><path d="M24 0h9"></path><text x="36" y="3.500">SYS</text></g>
          <g class="col__mark" data-dia><path d="M24 0h9"></path><text x="36" y="3.500">DIA</text></g>
        </svg>

        <div class="bp__read" aria-live="polite">
          <p class="bp__num"><b data-a>0</b><i data-slash>/</i><b data-b></b></p>
          <p class="bp__unit">mmHg</p>
          <svg class="bp__trace" viewBox="0 0 170 34" aria-hidden="true"><path class="trace__bed" d="M0 17h170"></path><path class="trace__line" data-trace d=""></path></svg>
          <p class="bp__pulse">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path data-heart d="M10 16.500C4.500 13 2.500 9.800 2.500 7.300A3.800 3.800 0 0 1 10 5.800a3.800 3.800 0 0 1 7.500 1.500c0 2.500-2 5.700-7.500 9.200Z"></path></svg>
            <b data-bpm>--</b><span>bpm</span>
            <span class="bp__class"><span data-class></span></span>
          </p>
        </div>
      </div>

      <button class="bp__go" type="button" data-go><span><span data-golabel>Measure</span></span></button>
    </section>

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

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 “Blood pressure reading” 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 black, a midnight blue card: at the top “Blood pressure” and a pill with the state; on the left a vertical column with a tick every twenty, on the right the large figure, “mmHg”, a flat trace, the heart with the pulse and at the bottom the light “Measure” button. Pressed, the state rolls to “Inflating”: the coral column rises, gathering speed, and the figure counts with it until it passes the systolic value, hesitates for a moment, then the state says “Measuring” and the column comes down slow and even. On the way down the beats are drawn on the trace: small at first, tall halfway between the two values, small again, and on each beat the heart swells. When the column passes the systolic value a “SYS” mark snaps in beside it and the figure stops there; at the diastolic value “DIA” snaps in. Then the result: 118/76, 64 bpm, and the green “Normal” pill; the column empties and the button says “Measure again”.

How it works

One number, the cuff’s pressure

The timeline animates a single value in mmHg: it rises with power2.in, hesitates, then falls linearly in RELEASE seconds. From it come the column’s height, the written figure and the moment the two marks snap in.

Beats with an envelope

The trace is a path that grows point by point as the pressure falls: each beat is a small spike, as tall as a bell centred between the two values says. It is how electronic monitors actually find the two values.

The result coming together

At the end of the release the figure takes the systolic value, the slash and the diastolic value appear on a spring, the figure’s weight drops from 820 to 640 and the category pill comes in with its colour.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff6b6bThe colour of the column and of the pulse.
SYSscript.js118The systolic pressure found, in mmHg.
DIAscript.js76The diastolic pressure found, in mmHg.
PULSEscript.js64The beats per minute.
PUMPscript.js1.5How many seconds the cuff takes to pump up.
RELEASEscript.js5How many seconds the pressure takes to come down.
HOLDscript.js2.6On its own: how many seconds it stays on the result before measuring again.
LOOPscript.jstrueLeft alone, a pointer starts the measurement.

Try them in the Playground

When to use it

In the app of a blood pressure monitor or a watch, in a health diary, in the patient area of a clinic or a pharmacy; and wherever a measurement has a wait worth making readable: scales, a thermometer, a speed test.

On phones

The same card: the column and the figure shrink with the window’s height, the button is 44 pixels tall and as wide as the card.

With reduced motion

No pumping and no running trace: after a moment the column shows the two marks and the result is written at once.

Pitfalls

  • The values are three settings, not a measurement: a demo measures nothing. In a real app they come from the device, and the trace is drawn from its data, not from a bell curve.
  • The categories follow the thresholds most used for adults (120/80, 130/80, 140/90) and are only a label: they are not a diagnosis and should come with the advice to talk to a doctor.
  • The category is not told by colour alone: there is the name, and the values sit in an aria-live region that announces them when the reading is done.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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