Skip to content
animorio
IT
All components

Request a sitter button

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

The “Request a sitter” button of a babysitting app: on tap it widens, a circle appears on the left where the initials of whoever is free nearby roll past, and the label says “Finding sitters nearby”. When one accepts, the button turns white with a violet edge, the circle stops on “MA” and takes colour, a green tick lands on its corner and the label says who is coming and when.

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>
<!--
  "Request a sitter 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>Request a sitter 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 Request a sitter button of a babysitting app: on tap it looks for who is free, the initials
         rolling in its circle, then widens with the sitter who accepted and the time -->
    <button class="bs" type="button" data-bs data-state="rest">
      <span class="bs__who" data-who aria-hidden="true"><span class="bs__roll"><span data-outwho>KR</span></span><i class="bs__badge" data-badge><svg viewBox="0 0 12 12"><path data-tick pathLength="1" d="m2.800 6.300 2.100 2.100 4.300-4.800"></path></svg></i></span>
      <span class="bs__face" data-face="rest"><svg class="bs__icon" data-icon viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="6.800" r="3.200"></circle><path d="M3.800 17c.6-3.200 3.100-5 6.200-5s5.600 1.800 6.200 5"></path></svg><span>Request a sitter</span></span>
      <span class="bs__face bs__face--side" data-face="busy"><b>Finding sitters nearby</b><i>Tonight, 7:00 to 11:00 pm</i></span>
      <span class="bs__face bs__face--side" data-face="done"><b>Mia accepted</b><i>Arrives 6:50 pm · 4.9 rating</i></span>
    </button>
    <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>

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.

14 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 “Request a sitter 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 violet pill 60 pixels tall with a person icon and “Request a sitter”; on mouse hover the icon gives a small hop. On tap the button presses in slightly and widens on a spring: a light circle pops up on the left and next to it a two-line label, “Finding sitters nearby” and “Tonight, 7:00 to 11:00 pm”. In the circle the initials of whoever is free roll past one after the other, bottom to top. When the search ends the button widens a little more, turns white with a violet edge and a tinted shadow, the circle stops on “MA” and takes a violet gradient, bouncing; on its bottom right corner a small green circle arrives with a tick drawing itself, and the label says “Mia accepted” and below it “Arrives 6:50 pm · 4.9 rating”. Another tap cancels the request and takes the button back to the start.

How it works

Three faces and a circle

The resting label, the searching one and the outcome are three absolute layers in the button; the avatar circle is a fourth element fixed on the left, appearing when needed. Nothing hidden takes room.

The rolling initials

A timeline splits the search time into beats: on every beat the initials leave upwards, the text changes while hidden and the new ones come in from below, inside the round window.

The outcome changes material

An attribute on the button takes it from solid violet to white with an edge: that way the confirmation reads as a small card and not as another invitation to press. The circle takes the gradient and the tick lands on its corner.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#5b4bffThe colour of the button and of the avatar of whoever accepts.
SEARCHscript.js2.2How many seconds the search for a free sitter lasts.
SPRINGscript.js1How much the button and the avatar bounce.
LOOPscript.jstrueLeft alone, the demo’s pointer makes the request and then starts again.

Try them in the Playground

When to use it

On the screen of a babysitting, nanny or home care app, where a request goes out to several people and the first one free answers; the same button carries a dog sitter, an emergency plumber, a driver, a courier or an on-call doctor.

On phones

The button is 60 pixels tall and 224 to 276 wide depending on its state, never more than the screen minus the margins. With a finger the tap is what counts: the icon’s hop is for the mouse only.

With reduced motion

The button changes width and face without springs; the initials in the circle change without rolling, and at the outcome avatar and tick are already in place. The demo’s pointer does not start.

Pitfalls

  • During the search the button has aria-busy and takes no more taps; an aria-live region announces the search and then who accepted, and the button’s label becomes “Mia accepted, arrives 6:50 pm. Cancel request”, so it is clear what another tap does.
  • The scrolling initials are decorative (aria-hidden): a screen reader user gets only the outcome, not six names read in two seconds.
  • The circle sits on the left with CSS left and top, and GSAP animates only its scale and opacity: if it were moved with a transform in the CSS, GSAP would overwrite it.
  • Here Mia always accepts after SEARCH seconds: in a real product the answer comes from the server, and may not come at all; a “no one free” state with another time slot to offer is needed. Names, times and rating are invented.

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