Skip to content
animorio
IT
All components

Reschedule button

Buttons, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 4.9 KBGSAP 28 KBFreeDownload the zip

The button for moving an appointment: a calendar leaf with the day, the label “Reschedule” and the date. Tap it and three free times slide out from under it one after the other on a spring. Pick one and they go back in, the leaf turns over to the new day, the date rolls and the label becomes “Moved” for a moment. The earlier time goes back among the free ones.

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>
<!--
  "Reschedule button" 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>Reschedule button</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">
    <!-- the button that moves an appointment: three free times slide out from under it, the calendar leaf
         turns over to the new day and the date rolls -->
    <div class="rs" data-rs>
      <button class="rs__btn" type="button" data-btn aria-expanded="false" aria-controls="rs-slots">
        <span class="rs__leaf" aria-hidden="true"><i><span data-month></span></i><span class="rs__day"><b data-day></b></span></span>
        <span class="rs__text">
          <span class="rs__label"><span data-label>Reschedule</span></span>
          <span class="rs__sub"><span data-sub></span></span>
        </span>
        <svg class="rs__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6.200 8 10.200l4-4"></path></svg>
      </button>
      <div class="rs__tray" id="rs-slots" data-tray role="group" aria-label="Free times"></div>
      <span class="rs__say" data-say aria-live="polite"></span>
    </div>

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

10 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 “Reschedule button” 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 wide pale button: on the left a white calendar leaf with a red header, “NOV”, and the number 26, beside it “Reschedule” and under it “Thu 26 Nov, 10:30”, on the right a down arrow. Tap it and the arrow turns up while three white rows come out from underneath, one after the other, dropping and settling with a small bounce: “Fri 27 Nov 09:00”, “Mon 30 Nov 14:30”, “Tue 1 Dec 11:00”. Pick one and the row gives, the three go back in from last to first and the arrow turns down; the number on the leaf tips forward and comes back as the new day, the date below rolls into “Mon 30 Nov, 14:30” and “Reschedule” becomes “Moved” in red; after a second and a half it is “Reschedule” again. Open it again and the earlier time is among the free ones. When the month changes the header rolls too. Esc or a tap outside closes it.

How it works

The times coming out

The three rows sit in an absolute container under the button: a gsap.fromTo with stagger starts them higher, transparent and smaller, and an elastic settles them.

The turning leaf

Only the part with the number rotates on X round its top edge: it goes to -88 degrees, changes the number and comes back from 80 to 0 on the elastic; the perspective is on the leaf.

The dates

The current time and the free times are Date objects: on choosing, the old one rejoins the list and the list is sorted again; the words come from toLocaleDateString.

Open and closed

The button has aria-expanded and aria-controls; Esc and a pointerdown outside close it, and after the choice focus returns to the button.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff5a4dThe colour of the leaf’s header and of the word “Moved”.
STAGGERscript.js0.05How many seconds between one time coming out and the next.
SPRINGscript.js1How much the times bounce as they come out and the leaf as it turns: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer opens the times, picks one and then another.

Try them in the Playground

When to use it

On the page of a booking already made: a clinic, a salon, a consultation, a delivery; in the reminder email opened on the site; in a shared calendar.

On phones

The same button, 288 pixels wide at most and 64 tall; the times are 40-pixel rows as wide as the button, easy to tap, and they sit below without moving it.

With reduced motion

The times appear and disappear without dropping, the leaf’s number and the date change at once and “Moved” appears without rolling. The demo does not move by itself.

Pitfalls

  • Dates and times are made up and start from fixed days written in the script: on a real site the free times come from the server, and may be gone by the time you confirm.
  • The times container is absolute: there must be room under the button, or it should open upwards when it is at the bottom of the page.
  • Focus goes to the first time only when opened from the keyboard; with the mouse it stays where it is.
  • The leaf’s rotation needs the perspective on the parent and the origin on the top edge, or it just looks squashed.
  • The aria-live region says the new date in full after the choice: the leaf alone does not tell people who cannot see it.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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