
The elastic button
Buttons, Hover, Text
The keyboard shortcuts window of a writing app, in the clean style of product pieces: it springs out of the small ? key in the corner and goes back into it with Esc, the drawn keycaps go down when a shortcut is used and the search folds away the rows that do not match.
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>
<!--
"Keyboard shortcuts window" 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 keyboard shortcuts window that opens with the question mark</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" data-stage>
<!-- a writing app with a small ? key in its corner: pressed, the shortcuts window springs out of the key itself, its
keycaps go down when a shortcut is used, the search folds away the rows that do not match, and Esc sends the
window back into the key it came from -->
<div class="fit" data-fit>
<div class="app" data-frame>
<header class="app__bar">
<svg class="app__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M5 19c3-1 5-3.5 6.5-7.5L14 5l3.5 2.5L15 13c-2.5 3-5.5 5-10 6Z"></path><path d="M11.5 11.5 15 13"></path></svg>
<p class="app__brand"><span data-brand>Quillmark</span> <span class="app__path">/ Launch notes</span></p>
<span class="app__saved">Saved</span>
</header>
<article class="doc" aria-hidden="true">
<p class="doc__title">Spring launch notes</p>
<p class="doc__line"><span>We ship the new editor on</span> <b class="doc__word" data-word>Thursday</b><span>, with comments and</span></p>
<p class="doc__line"><span>a cleaner sidebar. The beta list gets it a week earlier.</span></p>
<span class="doc__bar" style="width:92%"></span>
<span class="doc__bar" style="width:78%"></span>
<span class="doc__bar" style="width:86%"></span>
<span class="doc__bar" style="width:54%"></span>
</article>
<button class="help" type="button" aria-haspopup="dialog" aria-expanded="false" aria-label="Keyboard shortcuts" data-help>
<span class="help__cap" data-help-cap>?</span>
</button>
<section class="sheet" role="dialog" aria-modal="false" aria-labelledby="sheet-title" hidden data-sheet>
<header class="sheet__head">
<h2 class="sheet__title" id="sheet-title">Keyboard shortcuts</h2>
<button class="sheet__close" type="button" aria-label="Close" data-close><kbd class="k" data-esc><span class="k__face">Esc</span></kbd></button>
</header>
<label class="search">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="10.5" cy="10.5" r="6"></circle><path d="m15 15 4.5 4.5"></path></svg>
<input type="text" placeholder="Search shortcuts" autocomplete="off" spellcheck="false" aria-label="Search shortcuts" data-search>
<span class="search__count" data-count></span>
</label>
<div class="groups" data-groups></div>
<p class="sheet__foot" data-foot>Press <kbd class="k k--mini"><span class="k__face">?</span></kbd> anytime to open this</p>
</section>
</div>
</div>
<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>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.
32 values to change
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 “Keyboard shortcuts window” from Animorio and fit it into my siteThe app has two fixed sizes, wide with two columns and narrow with one column for tall boxes, and a wrapper scales it to fit the window, height included. This way the keycaps and the rows always stay in proportion.
On opening, the centre of the ? key is measured inside the window and used as the transformOrigin: the window starts at 0.07 with a large radius and reaches 1 with back.out, then the inner pieces rise staggered. Closing travels the same way back with power3.in.
Every keycap is a white face over a darker edge: pressing means moving the face two pixels down and bringing it back with back.out, one after another, with a longer pause for shortcuts made of two keys in a row.
At every letter each row checks whether its name contains the text: the ones that do not match go to zero height, the ones coming back go from zero to auto with a bounce; the letters found go into a blue mark and empty groups hide.
A timeline with repeatRefresh takes the drawn pointer to the ? key, opens, uses two shortcuts, types in the search and erases it, then presses Esc. At the first real touch or key it stops, and starts again from the top after nine quiet seconds.
| Name | File | Default | What it changes |
|---|---|---|---|
APP | script.js | Quillmark | The name of the invented writing app, top left. |
ACCENT | script.js | #3b5bfd | The colour of the search, the letters found and the row of the shortcut in use. |
OPEN | script.js | 0.6 | The seconds the window takes to spring out of the ? key. |
PRESS | script.js | 0.14 | The seconds a keycap takes to go down and come back up. |
TYPE_SPEED | script.js | 0.12 | The seconds between letters when the autopilot types in the search. |
PAUSE | script.js | 1 | The seconds the autopilot waits between one gesture and the next. |
For a writing app, an editor, a dashboard or any tool used from the keyboard: the help window that opens with ? and shows the shortcuts, searchable.
In a tall box the app switches to its narrow size, one column only, and is scaled to fit whole; the ? key and Esc stay big enough for a finger and a tap does what a click does.
No springs and no keycaps going down: the window fades in and out, the keycaps brighten for a moment, the search rows change without folding and the drawn pointer stays hidden.
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 27 October 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
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.