
The elastic button
Buttons, Hover, Text
The settings field where you choose a keyboard shortcut, in a card on black. “Record” sets it listening, with a light running round the border: the keys you press come in one by one as raised keycaps. A combination already taken is refused, the field shaking its head and naming the command that has it; a free one is saved with the keys going down in a row and a tick. “Reset” brings the original back.
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>
<!--
"Shortcut recorder" 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>Shortcut recorder</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 shortcut recorder from an app's settings: the field listens, the keys you press come in as raised
keycaps, a combination already taken is refused with the name of who has it, and Reset brings the default back -->
<section class="kr" data-kr aria-label="Shortcut recorder">
<header class="kr__head"><strong>Command menu</strong><span>Open it from anywhere</span></header>
<div class="kr__field" data-field>
<i class="kr__glow" data-glow aria-hidden="true"></i>
<span class="kr__keys" data-keys aria-hidden="true"></span>
<span class="kr__ask" data-ask aria-hidden="true">Type a shortcut</span>
<svg class="kr__mark" data-mark viewBox="0 0 20 20" aria-hidden="true"><path class="kr__ok" pathLength="1" d="M4.500 10.400 8.300 14.200 15.700 5.900"></path><path class="kr__no" pathLength="1" d="M10 4v7.200"></path><path class="kr__no" pathLength="1" d="M10 15v.100"></path></svg>
</div>
<p class="kr__status"><span class="kr__clip"><span data-outstatus>Ctrl Shift P opens the command menu</span></span></p>
<ul class="kr__others">
<li data-other="search"><span>Quick search</span><span class="kr__mini"><kbd>Ctrl</kbd><kbd>K</kbd></span></li>
<li data-other="sidebar"><span>Toggle sidebar</span><span class="kr__mini"><kbd>Ctrl</kbd><kbd>B</kbd></span></li>
</ul>
<div class="kr__acts">
<button type="button" class="kr__btn kr__btn--main" data-record><span class="kr__clip"><span data-outrecord>Record</span></span></button>
<button type="button" class="kr__btn kr__btn--ghost" data-reset>Reset</button>
</div>
</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>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.
23 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 “Shortcut recorder” from Animorio and fit it into my siteWhile the field listens, every key press is stopped before it reaches the browser and read: which modifiers are down and which key closes the combination.
Modifiers appear at once, pressed down and tinted, and stay while you hold them: whatever is already down is not redrawn.
The finished combination is compared with the ones already in use: if it is taken the field refuses it and says whose it is, then listens again.
Every key is two elements: the outer one comes in, the inner one goes down. That way the two animations never fight.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #8f9dff | The colour of listening and of the confirmation. |
PRESS | script.js | 3 | How many pixels a key goes down when pressed. |
STAGGER | script.js | 0.09 | How many seconds pass between one key and the next. |
SPRING | script.js | 1 | How much the keys bounce. |
LOOP | script.js | true | Left alone, the demo’s pointer records a shortcut already taken, then a free one, then resets. |
In the settings of a desktop app or a web app for people who work from the keyboard: editors, developer tools, mail clients, design apps, command launchers. The same field carries a game’s key bindings or an assistant’s voice command.
The card is at most 348 pixels wide and about 320 tall. On a touch screen there is no keyboard to listen to: “Record” plays a free combination by itself, one key after the other, so the piece still shows. The buttons are 44 pixels tall.
No turning light, no shake and no bounces: the keys appear already in place, the field changes colour and the texts change in one step. 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 7.7 KB; the libraries: GSAP 28 KB.
Tested on 1 December 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.