Skip to content
animorio
IT
All components

End call button

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

People searched for “end call” and “hang up” and the library had no real button to close a call. This is the control bar of Tandem, a made-up video call app, cut down to the essentials on black: the call time running with rolling digits, the microphone, the camera and the red button with the handset. On hover the handset tilts and the red warms up; pressed, the button squashes, the handset turns 135 degrees and hangs up, then the red widens into a pill with Leave and End for all. Pick one and the time stops, the bar reads “Call ended · 12:48”, then it gets ready again.

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>
<!--
  "End call 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>End call 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 call controls of Tandem, a made-up video call app: the running time, the microphone, the camera and the red
         End call button; pressed, the handset turns 135 degrees to hang up and the button opens into Leave and End for all -->
    <div class="bar" data-bar role="toolbar" aria-label="Call controls">
      <span class="bar__clip" aria-hidden="true"><span class="bar__grain"></span><span class="bar__warmth" data-warmth></span></span>

      <div class="time" data-time>
        <span class="time__name" data-meet>Studio sync</span>
        <span class="time__clock" data-clock aria-label="Call time"></span>
      </div>

      <button class="ctl" type="button" data-mic aria-pressed="false" aria-label="Mute microphone">
        <svg viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="3.4" width="6" height="11.2" rx="3"></rect><path d="M5.8 11.2a6.2 6.2 0 0 0 12.4 0M12 17.4v3"></path><path class="slash" d="M4.8 4.8 19.2 19.2" pathLength="1" data-slash></path></svg>
      </button>
      <button class="ctl" type="button" data-cam aria-pressed="false" aria-label="Turn camera off">
        <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3.6 8.4c0-1.1.9-2 2-2h7.8c1.1 0 2 .9 2 2v7.2c0 1.1-.9 2-2 2H5.6c-1.1 0-2-.9-2-2Z"></path><path d="m15.4 10.6 3.5-2.1c.6-.4 1.5.1 1.5.8v5.4c0 .7-.9 1.2-1.5.8l-3.5-2.1"></path><path class="slash" d="M4.8 4.8 19.2 19.2" pathLength="1" data-slash></path></svg>
      </button>

      <div class="slot">
        <div class="end" data-end>
          <span class="end__glow" data-glow aria-hidden="true"></span>
          <span class="end__red" data-red aria-hidden="true"></span>
          <span class="end__warm" data-warm aria-hidden="true"></span>
          <span class="end__dark" data-dark aria-hidden="true"></span>
          <span class="end__edge" aria-hidden="true"></span>
          <button class="end__btn" type="button" data-endbtn aria-label="End call" aria-expanded="false" aria-controls="end-choices">
            <span class="hs-wrap" data-hswrap>
              <svg class="hs" data-hs viewBox="0 0 24 24" aria-hidden="true"><path d="M8.1 3.9 9.9 7.6c.3.6.1 1.3-.4 1.7l-1.6 1.2c1 2.2 2.6 3.9 4.8 4.9l1.2-1.6c.4-.5 1.1-.7 1.7-.4l3.7 1.8c.6.3.9 1 .7 1.6l-.6 2.1c-.3.9-1.1 1.5-2 1.4C10.9 19.9 4.1 13.1 3.6 6.6c-.1-.9.5-1.8 1.4-2l2.1-.6c.4-.2.8-.2 1 0Z"></path></svg>
            </span>
          </button>
          <div class="choices" id="end-choices" data-choices role="group" aria-label="End the call">
            <button class="choice choice--leave" type="button" data-choice="leave"><span>Leave</span></button>
            <button class="choice choice--all" type="button" data-choice="all"><span>End for all</span></button>
          </div>
        </div>
      </div>

      <p class="ended" data-ended aria-hidden="true">
        <svg class="ended__hs" data-endedhs viewBox="0 0 24 24" aria-hidden="true"><path d="M8.1 3.9 9.9 7.6c.3.6.1 1.3-.4 1.7l-1.6 1.2c1 2.2 2.6 3.9 4.8 4.9l1.2-1.6c.4-.5 1.1-.7 1.7-.4l3.7 1.8c.6.3.9 1 .7 1.6l-.6 2.1c-.3.9-1.1 1.5-2 1.4C10.9 19.9 4.1 13.1 3.6 6.6c-.1-.9.5-1.8 1.4-2l2.1-.6c.4-.2.8-.2 1 0Z"></path></svg>
        <span>Call ended</span><span class="ended__sep">&middot;</span><span class="ended__time" data-endedtime>12:48</span>
      </p>
      <p class="sr" data-live aria-live="polite"></p>
    </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>

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.

23 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 “End call 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 background, a dark pill bar 64 pixels tall with fine grain, a thread of light along its top edge and a soft shadow. On the left the call’s name, Studio sync, and under it the running time, 12:43, 12:44, 12:45: each digit that changes rises from below in its window while the old one leaves at the top, staggered from the right like an odometer, with tabular digits that never jiggle. Next to it two neutral rounds, the microphone and the camera drawn in line, which can be switched off: the slash draws itself and the round turns white. On the right the red button with the white handset and a red glow falling on the bar. On hover the handset tilts by 14 degrees, the red warms towards orange, a halo lights up underneath and the button grows a touch. Pressed, it squashes and springs back while the handset turns 135 degrees on a spring until it hangs up; the microphone and the camera pull back to the right one after the other, the handset slides away and the red widens to the left into a deep red pill holding Leave, see-through grey, and End for all, full red, which come in from below, staggered. A click outside or Esc closes it on a spring and the handset turns upright again. Pick one and the key squeezes, the time stops and fades, the pill closes and vanishes, and “Call ended · 12:48” rises into the middle of the bar with the small red handset finishing its turn, while the bar settles on an elastic. After a moment the line leaves at the top, the restarted time comes back from the left, the rounds and the button spring back in and the handset straightens up. A drawn pointer runs the whole loop by itself: hover, press, pill, Leave, return.

How it works

Red that widens to the left

The button sits in a 64 pixel slot and the red shape is anchored to the right with right: 0: GSAP animates only its width, so it grows to the left over the microphone and the camera, which pull back meanwhile. The open width is measured on the spot with getBoundingClientRect, from the button’s right edge to just past the end of the time text, and measured again on resize.

Three layers for one colour

The red, the warm red and the deep red of the open pill are three layers with the same rounded edge: GSAP cross-fades their opacity instead of tweening a colour, so each state keeps its own gradient, top highlight and shadow.

The handset that hangs up

The handset is a filled SVG path drawn diagonally, as on a phone; turned 135 degrees around its centre it becomes horizontal with its ends pointing down, the hang-up sign. Hover takes it to 14 degrees, the press to 135 with back.out, the return to zero on a longer spring. Its wrapper moves and fades on its own, so rotation and exit never overwrite each other.

Rolling digits

The time is built digit by digit: every digit sits in a one-line window with hidden overflow. When it changes, the new one comes in from yPercent 100 to 0 with a hint of overshoot and the old one leaves to −100, staggered from the right; font-variant-numeric: tabular-nums keeps the widths still. The seconds are beaten by a gsap.delayedCall that calls itself again, stopped when the call ends.

Closing without choosing

With the pill open, a pointerdown outside the red shape or the Esc key closes it: the choices leave in reverse, the width goes back to 64 on back.out, the rounds spring back in staggered and focus returns to the button when using the keyboard.

Values to change

NameFileDefaultWhat it changes
MEETINGscript.jsStudio syncThe call’s name above the time.
START_TIMEscript.js763How many seconds the call has been running at the start.
TILTscript.js14How many degrees the handset tilts on hover.
HANG_ANGLEscript.js135How many degrees the handset turns to hang up.
SPRINGscript.js1.6How far the springs overshoot.
STAGGERscript.js0.08The stagger between Leave and End for all as they come in.
ENDED_HOLDscript.js2.2How long “Call ended” stays before the bar gets ready again.
LOOP_PAUSEscript.js1.2The autopilot’s pause before it starts again.

Try them in the Playground

When to use it

In the control bar of a video call or meeting app, in the player of a live class or webinar, in a support app with a customer call, in a browser phone or a remote consultation app: wherever ending a call has to be clear, easy to find and confirmed without effort.

On phones

The bar is at most 316 pixels wide and narrows with the window, always inside the phone preview box; the open pill is measured afresh each time, so Leave and End for all fit at any width. Touch presses like the mouse and the keys are 44 and 36 pixels tall; without hover the handset does not tilt before the press.

With reduced motion

No springs, turns or slides: the handset changes position with a fade, the pill takes its width at once and the choices fade in, the digits change without rolling and “Call ended” appears in place.

Pitfalls

  • Leave and End for all live inside the red shape, but a button cannot sit inside another button: the shape is a div, and the handset button covers it at rest and hides while the pill is open.
  • Rotation and exit on the same handset overwrote each other when the pill was closed halfway through opening: the rotation is on the svg and the slide with the fade on its wrapper.
  • Digits in hidden-overflow windows without tabular widths jiggled by half a pixel every second: tabular-nums and one window per digit.
  • The pill width measured only on opening was wrong if the demo window changed width with the pill open: it is measured again on resize.
  • The outside click that closes the pill also fired from the click that opened it: the check looks at whether the pointerdown lands inside the red shape.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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