Skip to content
animorio
IT
All components

Remind me button

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

The «Remind me» button of a live session at an invented photography school, Duskline: the cream pill squashes, turns dark and opens sideways into three lead times, 10 minutes, an hour and a day, with a cream mark sliding on a spring under the one you point at. Pick a lead and the others fold into it and the pill closes back around «Reminder 1 hour before», while the minute hand of the small clock on its left sweeps round and settles on the lead with a little overshoot and the amber arc of the dial fills. Below, the time of the ping arrives and a dusk glow wakes up; hover the button and it offers to cancel.

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>
<!--
  "Remind me 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>The remind me button with the lead time to pick</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 live session in Duskline, an invented photography school: «Remind me» opens into three lead times, the one
         you pick swallows the others and the pill closes back around it, while the minute hand of the small clock
         sweeps round and settles on the lead, and the arc of the dial fills as far as the lead goes -->
    <section class="event" data-event aria-labelledby="event-title">
      <span class="event__glow" data-glow aria-hidden="true"></span>
      <header class="event__head">
        <span class="event__tag">
          <svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.5" y="4" width="9" height="8" rx="2"/><path d="M10.5 7.2l4-2.2v6l-4-2.2"/></svg>
          Live session
        </span>
        <span class="event__school">Duskline</span>
      </header>
      <h1 class="event__title" id="event-title">Slow light: shooting at dusk</h1>
      <p class="event__meta">Thu 19 Nov <span aria-hidden="true">·</span> 20:00 <span aria-hidden="true">·</span> 48 min <span aria-hidden="true">·</span> with Ines Varga</p>

      <div class="remind" data-remind>
        <span class="remind__shine" data-shine aria-hidden="true"></span>
        <span class="remind__clock" aria-hidden="true">
          <svg viewBox="0 0 28 28">
            <circle class="remind__dial" cx="14" cy="14" r="10.5"/>
            <circle class="remind__arc" data-arc cx="14" cy="14" r="10.5" pathLength="1"/>
            <g class="remind__ticks"><path d="M14 5.2v1.6M22.8 14h-1.6M14 22.8v-1.6M5.2 14h1.6"/></g>
            <line class="remind__hand remind__hand--hour" data-hour x1="14" y1="14" x2="14" y2="9.6"/>
            <line class="remind__hand" data-hand x1="14" y1="14" x2="14" y2="6.8"/>
            <circle class="remind__pin" cx="14" cy="14" r="1.3"/>
          </svg>
        </span>
        <button class="remind__layer remind__idle" type="button" data-idle aria-haspopup="true" aria-expanded="false">Remind me</button>
        <div class="remind__layer remind__choices" data-choices role="radiogroup" aria-label="Remind me before the session">
          <span class="remind__mark" data-mark aria-hidden="true"></span>
          <button class="remind__chip" type="button" role="radio" aria-checked="false" data-chip="10">10 min</button>
          <button class="remind__chip" type="button" role="radio" aria-checked="false" data-chip="60">1 hour</button>
          <button class="remind__chip" type="button" role="radio" aria-checked="false" data-chip="1440">1 day</button>
          <button class="remind__close" type="button" data-close aria-label="Close">
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 4.5l7 7M11.5 4.5l-7 7"/></svg>
          </button>
        </div>
        <button class="remind__layer remind__set" type="button" data-set>
          <span class="remind__set-in" data-setin><span class="remind__set-word">Reminder</span> <span data-setlead>1 hour before</span></span>
          <span class="remind__set-out" data-setout aria-hidden="true">Cancel reminder</span>
        </button>
      </div>
      <p class="event__note" data-note aria-live="polite"><span data-notetext>We’ll ping you at 19:00.</span></p>
    </section>
    <svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></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.

37 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 “Remind me 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 a black page sits the dark card of a live session, Live session, Duskline, «Slow light: shooting at dusk», Thursday 19 November at 20:00 with Ines Varga, with a 1px edge, a layered shadow and a soft light at the top. At the bottom of the card, the cream pill «Remind me» with a small clock on its left. On hover a light crosses it; pressed, it squashes, turns dark and stretches on a spring to show three lead times, 10 min, 1 hour and 1 day, and a cross to close, coming in from the left one after the other. A cream mark slides under the lead you point at. Pick one: the others vanish, the chosen one slides to the start and the pill closes around «Reminder 1 hour before», turning cream again; the minute hand sweeps round (a sixth of a turn for 10 minutes, one turn for an hour, two for a day) and settles with a small overshoot, the hour hand follows by a twelfth, the amber arc of the dial fills as far as the lead goes. Under the card «We’ll ping you at 19:00.» arrives and a dusk glow wakes up behind. On the set button the label gives way to «Cancel reminder»: click and the hand winds back and everything goes home. A drawn pointer plays the whole story until the real one arrives.

How it works

One pill, three layers

The pill is a single element holding three layers on top of each other: the Remind me label, the row of lead times and the set reminder. GSAP changes its width by measuring the incoming layer (scrollWidth plus the clock's 40 pixels), on a back.out curve overshooting by OVERSHOOT, along with the background and text colour.

The sliding mark

Under the lead times sits an absolute cream mark: on hover or focus it takes the position and width of the lead with offsetLeft and offsetWidth, in 0.42 seconds on the same spring. Once a lead is picked it slides to the start with the mark while the others shrink and vanish.

The hand and the arc

The two hands of the SVG clock turn around the centre with svgOrigin 14 14: the minute hand by a sixth of a turn, one turn or two, the hour hand by a twelfth of that; the arc is a circle with pathLength 1 and a stroke-dasharray going from 0 to 1/6 or 1.

Cancelling

Hovering the reminder lifts the label away and brings «Cancel reminder», widening the pill as needed; a click brings the hands back to zero, turns off the arc, the note and the glow, and puts Remind me back.

The pilot

A GSAP timeline moves a drawn pointer, hovers the lead times, picks one, cancels and starts again with another; at the first real pointer move, touch or key it stops and disappears.

Values to change

NameFileDefaultWhat it changes
OPENscript.js0.62Seconds for the pill to open into the lead times.
CLOSEscript.js0.55Seconds for the pill to close around the chosen lead.
SWEEPscript.js1.3Seconds for the minute hand to sweep round to the lead.
OVERSHOOTscript.js1.5How far the hand and the pill pass their mark before settling (0 none).
PRESSscript.js0.965How much the pill squashes under the finger (1 never).
SHINEscript.js0.9Seconds of the light that crosses the pill on hover (0 none).
GLOWscript.js1How bright the dusk glow is once a reminder is set (0 none).
SPEEDscript.js12 = the pilot twice as fast, 0.5 = half.

Try them in the Playground

When to use it

On the page of an event, a livestream, a webinar, a launch or an online class: whoever can't be there now picks when to be reminded with a single gesture, and sees right away that the reminder is set.

On phones

The same animation with adapted sizes: the card is 92% of the screen wide, the headline is sized on the height too, the lead times are a little narrower and the open pill stays inside the card. Without hover the set reminder is cancelled with a tap.

With reduced motion

Nothing moves: the pill changes width at once, the layers swap with a fade, the hands go straight to their place and the arc appears already filled; the pilot has no pointer and only shows the three states one after another.

Pitfalls

  • The width of the layers is measured only once the font has arrived (document.fonts.ready): measured before, the pill stayed narrow and the label ran past its edge.
  • The mark under the lead times is measured against the row (offsetLeft), which is positioned: with getBoundingClientRect it would also follow the pill as it widens.
  • Hidden layers stay in the html with visibility hidden (autoAlpha), so the keyboard doesn't land on them.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.4 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