
The star rating
Ratings, SVG, Hover
The barometer of a weather app: a half-moon dial from 980 to 1040 hectopascals with its ticks, the words “Rain”, “Change” and “Fair” and a red needle. Pick one of four hours and the needle snaps to the new value, overshoots and swings before settling; the golden set hand follows later and stops where the needle was. At the top the pressure counts and the trend says whether it is rising or falling.
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>
<!--
"Barometer" 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>Barometer</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 barometer of a weather app: the needle springs to the pressure of the chosen hour, the set hand
stays where the needle was, and the trend says whether it is rising or falling -->
<section class="bm" data-bm aria-labelledby="bm-title">
<header class="bm__head">
<span class="bm__name"><b id="bm-title">Pressure</b><span>Harbour station, sea level</span></span>
<span class="bm__read"><span class="bm__value" aria-live="polite"><b data-value>1013</b><span>hPa</span></span><span class="bm__trend"><svg data-arrow viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4"></path></svg><span class="bm__roll"><span data-trend>Steady</span></span></span></span>
</header>
<div class="bm__dial">
<svg viewBox="0 0 296 150" aria-hidden="true">
<path class="bm__arc" d="M34.0 140.0A114 114 0 0 1 262.0 140.0"></path>
<line class="bm__tick bm__tick--big" x1="36.00" y1="140.00" x2="45.00" y2="140.00"></line><line class="bm__tick" x1="36.61" y1="128.29" x2="40.59" y2="128.71"></line><line class="bm__tick" x1="38.45" y1="116.71" x2="42.36" y2="117.55"></line><line class="bm__tick" x1="41.48" y1="105.39" x2="45.29" y2="106.63"></line><line class="bm__tick" x1="45.68" y1="94.45" x2="49.34" y2="96.07"></line><line class="bm__tick bm__tick--big" x1="51.01" y1="84.00" x2="58.80" y2="88.50"></line><line class="bm__tick" x1="57.39" y1="74.17" x2="60.63" y2="76.52"></line><line class="bm__tick" x1="64.77" y1="65.06" x2="67.74" y2="67.73"></line><line class="bm__tick" x1="73.06" y1="56.77" x2="75.73" y2="59.74"></line><line class="bm__tick" x1="82.17" y1="49.39" x2="84.52" y2="52.63"></line><line class="bm__tick bm__tick--big" x1="92.00" y1="43.01" x2="96.50" y2="50.80"></line><line class="bm__tick" x1="102.45" y1="37.68" x2="104.07" y2="41.34"></line><line class="bm__tick" x1="113.39" y1="33.48" x2="114.63" y2="37.29"></line><line class="bm__tick" x1="124.71" y1="30.45" x2="125.55" y2="34.36"></line><line class="bm__tick" x1="136.29" y1="28.61" x2="136.71" y2="32.59"></line><line class="bm__tick bm__tick--big" x1="148.00" y1="28.00" x2="148.00" y2="37.00"></line><line class="bm__tick" x1="159.71" y1="28.61" x2="159.29" y2="32.59"></line><line class="bm__tick" x1="171.29" y1="30.45" x2="170.45" y2="34.36"></line><line class="bm__tick" x1="182.61" y1="33.48" x2="181.37" y2="37.29"></line><line class="bm__tick" x1="193.55" y1="37.68" x2="191.93" y2="41.34"></line><line class="bm__tick bm__tick--big" x1="204.00" y1="43.01" x2="199.50" y2="50.80"></line><line class="bm__tick" x1="213.83" y1="49.39" x2="211.48" y2="52.63"></line><line class="bm__tick" x1="222.94" y1="56.77" x2="220.27" y2="59.74"></line><line class="bm__tick" x1="231.23" y1="65.06" x2="228.26" y2="67.73"></line><line class="bm__tick" x1="238.61" y1="74.17" x2="235.37" y2="76.52"></line><line class="bm__tick bm__tick--big" x1="244.99" y1="84.00" x2="237.20" y2="88.50"></line><line class="bm__tick" x1="250.32" y1="94.45" x2="246.66" y2="96.07"></line><line class="bm__tick" x1="254.52" y1="105.39" x2="250.71" y2="106.63"></line><line class="bm__tick" x1="257.55" y1="116.71" x2="253.64" y2="117.55"></line><line class="bm__tick" x1="259.39" y1="128.29" x2="255.41" y2="128.71"></line><line class="bm__tick bm__tick--big" x1="260.00" y1="140.00" x2="251.00" y2="140.00"></line>
<text class="bm__num" x="57.0" y="143.5">980</text><text class="bm__num" x="102.5" y="64.7">1000</text><text class="bm__num" x="193.5" y="64.7">1020</text><text class="bm__num" x="239.0" y="143.5">1040</text>
<text class="bm__zone" data-zone x="72" y="112">Rain</text>
<text class="bm__zone" data-zone x="148" y="60">Change</text>
<text class="bm__zone" data-zone x="224" y="112">Fair</text>
<g data-set><path class="bm__set" d="M148 140V42"></path><path class="bm__setcap" d="M144 46L148 39L152 46"></path></g>
<g data-needle><path class="bm__needle" d="M144.8 140L148 32L151.2 140Z"></path></g>
<circle class="bm__hub" cx="148" cy="140" r="9"></circle><circle class="bm__hubin" cx="148" cy="140" r="3"></circle>
</svg>
</div>
<div class="bm__hours" role="group" aria-label="Hour" data-hours>
<span class="bm__pill" data-pill aria-hidden="true"></span>
<button class="bm__hour" type="button" data-hour aria-pressed="true">Now</button>
<button class="bm__hour" type="button" data-hour aria-pressed="false">+6 h</button>
<button class="bm__hour" type="button" data-hour aria-pressed="false">+12 h</button>
<button class="bm__hour" type="button" data-hour aria-pressed="false">+24 h</button>
</div>
</section>
<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>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.
27 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Barometer” from Animorio and fit it into my siteA function takes the pressure, between 980 and 1040, to an angle between minus 90 and plus 90 degrees. Both hands are SVG groups: the angle is an animated number, written in the transform attribute with the hub as the centre of rotation.
GSAP takes the number to the new value on an elastic spring SWING seconds long: the needle goes past the point and comes back, as on a real instrument. SPRING says how much.
It is a second number: it starts LAG seconds later and goes, on a soft curve, to the value the needle had before the change. The gap between the two is the trend.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #d1432f | The colour of the needle and of the trend arrow. |
SWING | script.js | 1.6 | How long the needle takes to settle on the new value. |
LAG | script.js | 0.5 | After how many seconds the set hand reaches the earlier place. |
In weather apps and sites, for a harbour, a sailing club, a mountain hut or a home weather station; and, changing numbers and words, for any reading with a needle: tyre pressure, a tank’s level, a server’s load.
The same card, as wide as the screen minus the margins: the dial shrinks with the card staying a whole half-moon, the four hours are buttons 36 pixels tall. The card is about 280 pixels tall and fits the phone box.
No swinging: on changing hour the needle is on the new value at once and the set hand on the earlier one, the number changes without counting and the trend arrow is already tilted. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.8 KB; the libraries: GSAP 28 KB.
Tested on 25 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.
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.