Skip to content
animorio
IT
All components

Editable budget table

Tables, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 9.7 KBGSAP 28 KBFreeDownload the zip

The quarterly budget of an invented accounting app, Tallyfold, in a dark glass card like a Dribbble shot: five spending lines, each with a bar of what is already spent, the planned figure and what is left. Tap the planned figure and a field rises over the cell with a ring of light, the figure already selected and the other lines stepping back; type the new amount, Enter, and the digits roll one by one like an odometer, the bar springs to its new share (and turns coral if the line goes over), what is left and the totals roll and the chip at the top goes from Saving to Saved with a check that draws itself.

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>
<!--
  "Editable budget table" 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>The budget table with the cell you edit in place</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">
    <div class="wrap" data-wrap>
      <section class="sheet" data-card aria-label="Q4 marketing budget">
        <span class="sheet__light" aria-hidden="true"></span>
        <span class="sheet__rim" aria-hidden="true"></span>

        <div class="sheet__body">
          <header class="head">
            <span class="head__title">
              <span class="head__name">Q4 budget</span>
              <span class="head__sub">Tallyfold · Marketing · USD</span>
            </span>
            <span class="chip" data-chip aria-live="polite">
              <span class="chip__icon" data-chip-icon aria-hidden="true"></span>
              <span class="chip__word" data-chip-word>All changes saved</span>
            </span>
          </header>

          <div class="grid" role="table" aria-label="Budget lines">
            <div class="cols" role="row">
              <span role="columnheader">Line</span>
              <span role="columnheader" class="cols__n">Planned</span>
              <span role="columnheader" class="cols__n">Left</span>
            </div>
            <div class="rows" data-rows role="rowgroup"></div>
            <div class="total" role="row">
              <span role="cell" class="total__name">
                Total
                <span class="total__meta" data-total-pct>77% spent</span>
              </span>
              <span role="cell" class="total__n"><span class="num" data-total-plan></span></span>
              <span role="cell" class="total__n"><span class="num" data-total-left></span></span>
            </div>
          </div>
        </div>
      </section>
    </div>
  </main>

  <svg width="0" height="0" style="position:absolute" aria-hidden="true">
    <symbol id="pen" viewBox="0 0 16 16"><path d="M10.6 2.6l2.8 2.8-7.7 7.7-3.4.6.6-3.4z" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/><path d="M9.2 4l2.8 2.8" fill="none" stroke="currentColor" stroke-width="1.3"/></symbol>
  </svg>

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

26 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 “Editable budget table” 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 a black page the budget card stands alone, in dark glass with a periwinkle light falling from the top corner, a one pixel edge that catches the light where the pointer passes and a soft layered shadow. At the top Q4 budget, under it Tallyfold · Marketing · USD, on the right a pill chip with a check: All changes saved. Then five lines: Paid search, Events, Content, Design tools, Freelancers. Each row has the name with the share spent, a hairline periwinkle bar, under it how much is already spent, and on the right the planned figure and what is left; at the bottom the total with its share. Hovering the planned figure the cell brightens and a small pencil appears. On a tap the cell gives a hair and a field rises over it on a spring with a periwinkle ring of light and a glow, the figure already selected and a blinking caret; the other lines step back and the chip becomes Editing Events with the pencil. Type 9500: the first key replaces everything, the thousands commas place themselves. On Enter the field sinks back into the cell, the figure gives a small bump and a light crosses it, the digits roll from right to left and the extra one disappears by narrowing; the Events bar springs forward to the end with a streak of light and turns coral, the share goes to 116% and what is left rolls to minus 1,480 in coral. The planned total and the total left roll too. The chip spins on Saving with a turning arc and then becomes Saved just now with a check that draws itself, widening and narrowing on a spring. Then the same on Content, which goes up to 12,000 while its bar gets shorter. After a few still seconds the figures go back to where they started and the loop begins again. It works for real: Tab moves to the next line, Esc puts the old figure back with a small shake.

How it works

Odometer digits

Each digit is a strip of eleven rows (0-9 and a blank) in a window one digit tall. To change a number the old and new strings are aligned right, and for each place the strip goes from the old digit to the new one with a back.out, right to left with STAGGER of delay; a digit that disappears rolls to the blank row and its window narrows to zero, one that appears does the opposite. The commas stay still because, aligned right, they always fall in the same place.

The field over the cell

The cell is a real button; over it sits a drawn field (text, selection and caret) and under it an invisible real input that takes the keys. The field rises with scale from 0.92 to 1 on a spring with a ring made of box-shadow; the selection widens from the right and the first key replaces it, as in a spreadsheet. The drawing always reads the cleaned value of the input, digits only, with commas put in by toLocaleString.

The bar that springs

The spend bar is one element for GSAP (scaleX from 0 to 1, origin on the left) with the colour inside, which CSS turns coral with the is-over class: so GSAP never wipes the colour and CSS never touches the transform. On a change it springs with an elastic.out and a streak of light crosses it.

The chip that changes width

The chip’s width is read, icon and word change, it is read again and GSAP goes from the first to the second on a spring, then drops the inline width. The Saved check draws itself with stroke-dashoffset, the Saving arc turns with an endless rotation that stops on the change.

The loop on its own

A single timeline plays the two edits with calls: hover, press, field open, one key every TYPE_GAP seconds, Enter. The first real touch on the card stops it for good and the table is yours. It starts from the load event, so poster and video always land on the same moment.

Values to change

NameFileDefaultWhat it changes
TITLEscript.jsQ4 budgetThe title of the card.
SPEEDscript.js1The speed of the edits on their own: 2 twice as fast, 0.5 half.
SPRINGscript.js1How springy the figures and the field are: 0.4 calm, 2 very bouncy.
ROLLscript.js0.7How many seconds a digit takes to roll.
STAGGERscript.js0.05The delay between one digit and the next, from the right.
TYPE_GAPscript.js0.17The seconds between two keys when the table types by itself.
DIMscript.js0.42How much the other lines step back while one is edited: 1 not at all.
HOLDscript.js3The seconds of pause before the edits start again.
LOOPscript.jstrueWhether the table repeats the edits on its own forever.

Try them in the Playground

When to use it

For the back office, dashboard or accounting app of a company or an agency: a budget, a quote, a price list or an inventory where the figures are corrected right in the table, without opening a dialog. It fits anywhere you need to change a number in a row and see at once what changes around it.

On phones

On the phone the card is 92% of the screen wide and the rows follow the height too, so it fits the box; under 360 pixels the spent line hides and the bar with its share stays. A tap opens the field and the number keyboard; the hover pencil is not needed.

With reduced motion

Nothing moves: the field fades in and out, the digits change in place with a fade, the bar changes length without a spring or a streak, the chip changes word with a fade and the Saving arc stays still.

Pitfalls

  • With font-variant-numeric tabular-nums Mona Sans uses the slashed zero: the digits sit anyway in windows of equal width, measured once over ten zeros, so tabular figures are not needed and the zero is back to normal.
  • The pencil inside the button widened the Planned column on the phone and the rows lost their aligned columns (each row is a grid of its own): the pencil is absolute and does not count in the width.
  • Focusing an input while the preview plays on its own stole the keyboard from the page around it: in the loop only the drawn field is shown, the real input takes the focus only on a real touch.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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