Skip to content
animorio
IT
All components

OKR progress card

Cards, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 6.5 KBGSAP 28 KBFreeDownload the zip

A quarter’s objective with its three key results in a white card. Tap a result to log a check-in: its bar springs forward, the ring recomputes the average and the status is judged against the black notch of where the quarter is today: Off track, At risk, On track, all the way to Achieved.

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>
<!--
  "OKR progress 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>OKR progress card</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 quarter's objective with its three key results: log a check-in on one and its bar springs forward,
         the ring recomputes the average and the status is judged against where the quarter is today -->
    <section class="okr" data-okr aria-label="Objective and key results">
      <header class="okr__head">
        <span class="okr__when">Q4 2026 <i data-week></i></span>
        <span class="okr__roll okr__status" aria-live="polite"><span data-status></span></span>
      </header>
      <div class="okr__goal">
        <span class="okr__ring">
          <svg viewBox="0 0 64 64" aria-hidden="true">
            <circle class="okr__track" cx="32" cy="32" r="26"></circle>
            <circle class="okr__arc" data-arc cx="32" cy="32" r="26" transform="rotate(-90 32 32)"></circle>
            <line class="okr__notch" data-notch x1="32" y1="2" x2="32" y2="10"></line>
          </svg>
          <b class="okr__pct"><span data-pct>0</span><i>%</i></b>
        </span>
        <span class="okr__text">
          <span class="okr__label">Objective</span>
          <h1 class="okr__title">Make onboarding effortless</h1>
        </span>
      </div>
      <div class="okr__list" data-list></div>
      <footer class="okr__foot">
        <span class="okr__key"><i></i>Where the quarter is today</span>
        <span class="okr__roll okr__hint"><span data-hint>Tap a result to check in</span></span>
      </footer>
    </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>

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 “OKR progress 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

On white, a card: “Q4 2026”, the week of the quarter and the status pill. Below, a ring with the percentage and the objective, “Make onboarding effortless”. Then three rows, one per key result: the name, the current value next to the target and a violet bar; on every bar and on the ring a black notch marks where the quarter is today. At first bars and ring grow from empty, one after the other. Tap a row to log the next check-in: the value rolls, the bar jumps forward with a small bounce, a black pill with the difference pops up for a moment (“+7%”, “−1.1 min”: the second result is a time that must go down), the ring turns to the new average and counts. The status is judged again each time: far below the notch it is “Off track” in red, a little below “At risk” in amber, close or above “On track” in green. A result that reaches its target turns green and a tick draws next to the value; with all three it is “Achieved”. One more tap on a finished result takes it back to week one.

How it works

Each result is a share

For each key result: (value − start) divided by (target − start). It also works when the number has to go down, like the minutes of the second one. The ring is the average of the three shares.

Status is judged against time

The black notch is the week divided by thirteen. The distance between the notch and the average decides the status and the colour, which is a single CSS variable: pill and ring read it and change together.

A spring per bar

Each bar and the ring have a spring integrated on GSAP’s ticker, chasing the new share. The bar is a whole element sliding inside a rail with hidden overflow, so its tip stays round while it bounces.

Rows that are buttons

Each row is a button: it takes focus, answers Enter and Space, and its label says value, target and what a tap does. The status sits in an aria-live region.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#4b3bffThe colour of the key result bars.
WEEKscript.js8Which week of the quarter it is (1 to 13): moves the black “today” notch.
AT_RISKscript.js8How many points below the notch trigger “At risk”; beyond twice that plus 4 it is “Off track”.
BOUNCEscript.js1How much bars and ring bounce on each check-in: 0.3 = stiff, 2 = very springy.
LOOPscript.jstrueLeft alone, the demo’s pointer logs the check-ins one after the other.

Try them in the Playground

When to use it

In the dashboard of a company goals tool, on a team’s page, in the quarterly review. The same judgement against time suits a budget, a fundraiser, a training plan: how much is done, compared with how much time has gone.

On phones

The same card, as wide as the screen: the rows are tall enough for a finger and you tap them. In a short window the bottom line goes and the rows tighten.

With reduced motion

Bars and ring go straight to their place without bouncing, values change without rolling and the difference pill does not appear. The demo does not move by itself.

Pitfalls

  • Objective, results and numbers are made up. A real card takes the check-ins from the team’s tool and feeds them to the same formula.
  • A result that has to go down (times, costs, complaints) has a target lower than its start: the share formula holds, but the difference must show its real sign, here “−1.1 min”.
  • The bar slides with a percentage translateX written by hand in the style: GSAP does not re-read percentages from CSS, and scaling the bar would squash its round tip.
  • The bounce past 100% is clipped by the rail: without hidden overflow the bar would leave the card on the last check-in.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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