
The elastic button
Buttons, Hover, Text
The orders table of a small shop, on white, in the style of real product interface pieces: tapping a row opens below it, on a spring, the order details with the products, the shipping line and the buttons, while the chevron turns and the rows below slide down. Mark shipped rolls the status label from Paid to Shipped and moves the line on; opening another row closes the first.
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>
<!--
"Expandable orders 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 orders table with the row that opens</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>
<!-- the orders table of a small shop: a row opens into its details on a spring, the chevron turns, the rows below slide down;
inside, the items, the shipping line and Mark shipped, which rolls the status label of the row and moves the line on -->
<div class="wrap" data-wrap>
<section class="card" data-card aria-label="Fernlow orders">
<header class="card__head">
<svg class="card__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 20V9"></path><path d="M12 13c-3.6 0-6-2.2-6-6 3.6 0 6 2.2 6 6Z"></path><path d="M12 11c0-3.4 2.2-5.6 6-5.6 0 3.4-2.2 5.6-6 5.6Z"></path></svg>
<div>
<p class="card__brand">Fernlow <span>/ Orders</span></p>
<p class="card__sub" data-sub>4 orders this week</p>
</div>
</header>
<div class="table" role="table" aria-label="Orders">
<div class="thead" role="row">
<span role="columnheader">Order</span>
<span role="columnheader" class="col-who">Customer</span>
<span role="columnheader" class="col-date">Date</span>
<span role="columnheader" class="col-num">Total</span>
<span role="columnheader">Status</span>
<span aria-hidden="true"></span>
</div>
<div data-rows></div>
</div>
</section>
</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.
25 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 “Expandable orders table” from Animorio and fit it into my siteEach row is a button with aria-expanded and its columns in the same CSS grid as the header: it opens with a click, a tap or Enter, and the columns stay aligned. The details panel sits right below it, zero high with hidden overflow.
On opening, GSAP takes the panel height from its current size to scrollHeight with back.out, so it goes a little past and settles; at the end it sets it to auto, so a resize cannot leave it wrong. At the same time the chevron turns 180 degrees and the parts come in with a stagger.
To change status the label briefly holds both words one above the other in a column twenty pixels per word: the column rises by twenty, the width goes from the old one to auto, and at the end only the new word is left.
The preview framing is measured once, at rest: so the card’s container takes a minimum height equal to the closed card plus the tallest panel, measured at start and on every resize.
A timeline with repeatRefresh takes the drawn pointer to the rows and buttons reading their real position every time and calls the same functions as real clicks. At the first real touch it stops, and it starts again after eight quiet seconds.
| Name | File | Default | What it changes |
|---|---|---|---|
SHOP | script.js | Fernlow | The shop name at the top of the table. |
ACCENT | script.js | #2e7d5b | The colour of the shipping line, the Shipped label and the done button. |
OPEN_TIME | script.js | 0.7 | The seconds a row takes to open into its details. |
STAGGER | script.js | 0.06 | The seconds between one detail and the next as they come in. |
BOUNCE | script.js | 1.6 | How far the row overshoots its height before settling. |
PAUSE | script.js | 1.2 | The seconds the autopilot waits between one gesture and the next. |
For an online shop’s orders panel, a restaurant’s or hotel’s bookings, a dashboard’s invoices or tickets: any list in a table where the details are needed only now and then.
Under 520 pixels the date column goes, the others tighten and the panel stacks products and shipping, with a single product; the rows are sized on the height too (8.2vh between 34 and 42 pixels), so the open table fits in the box.
No springs and no rolls: the row opens at once and the details fade in, the chevron is already turned, the label swaps word with a fade, the line is already at its point 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 6.9 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.