Skip to content
animorio
IT
All components

Suggest reply button

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

The work chat of an invented app, on an almost black background, in the style of the light effects of AI apps: under a message that just arrived sits the Suggest reply button with a sparkle. Press it and a light starts running round its border and passes over the message as if reading it; then three suggested replies fan out of the button, one pill after another with a glint. Pick one: it flies down into the composer and writes itself there letter by letter, Send lights up and the reply goes out as your own message, with Sent and a tick that draws itself.

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>
<!--
  "Suggest reply 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 Suggest reply button that fans out three AI replies</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 work chat: under a message just received, the Suggest reply button lights up and fans out three
         suggested replies; pick one and it flies into the composer and writes itself, then Send -->
    <article class="card" data-card aria-label="Chat with Teagan Brooks">
      <header class="card__top">
        <p class="card__chan">
          <svg class="card__hash" viewBox="0 0 20 20" aria-hidden="true"><path d="M8 3.5 6.6 16.5M13.4 3.5 12 16.5M3.8 7.6h13M3.2 12.4h13"></path></svg>
          <span>q4-review</span>
        </p>
        <p class="card__app">Quaywell</p>
      </header>

      <div class="msg" data-msg>
        <span class="msg__avatar" aria-hidden="true">TB</span>
        <div class="msg__main">
          <p class="msg__who"><span>Teagan Brooks</span><span class="msg__time">10:42</span></p>
          <p class="msg__text" data-msg-text>Can we move the review to Thursday? The deck still needs the new Q4 numbers.</p>
          <span class="msg__sweep" data-sweep aria-hidden="true"></span>
        </div>
      </div>

      <!-- the slot keeps the space for the suggestions and for the reply once it is sent -->
      <div class="slot" data-slot>
        <div class="fan" data-fan role="list" aria-label="Suggested replies"></div>
        <div class="out" data-out aria-live="polite">
          <p class="out__bubble" data-out-text></p>
          <p class="out__state" data-out-state>
            <svg viewBox="0 0 20 20" aria-hidden="true"><path data-tick d="M5 10.4 8.4 13.6 15 6.8"></path></svg>
            <span>Sent</span>
          </p>
        </div>
      </div>

      <footer class="composer">
        <div class="btnwrap" data-wrap>
          <span class="btn__halo" data-halo aria-hidden="true"><span class="btn__spin" data-spin-halo></span></span>
          <button class="btn" type="button" data-btn aria-label="Suggest reply">
            <span class="btn__ring" data-ring aria-hidden="true"><span class="btn__spin" data-spin></span></span>
            <span class="btn__face" aria-hidden="true"><span class="btn__shine" data-shine></span></span>
            <span class="btn__in">
              <svg class="btn__spark" data-spark viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.4c.55 4 2.2 5.65 6.2 6.2-4 .55-5.65 2.2-6.2 6.2-.55-4-2.2-5.65-6.2-6.2 4-.55 5.65-2.2 6.2-6.2Z"></path><path d="M15.4 13.6c.2 1.4.75 1.95 2.15 2.15-1.4.2-1.95.75-2.15 2.15-.2-1.4-.75-1.95-2.15-2.15 1.4-.2 1.95-.75 2.15-2.15Z"></path></svg>
              <span class="btn__label" data-label></span>
            </span>
          </button>
        </div>
        <div class="field" data-field>
          <span class="field__ph" data-ph>Reply to Teagan</span>
          <span class="field__text" data-typed></span><span class="field__caret" data-caret aria-hidden="true"></span>
        </div>
        <button class="send" type="button" data-send aria-label="Send" disabled>
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 15.6V4.6"></path><path d="M5.4 9.2 10 4.6l4.6 4.6"></path></svg>
        </button>
      </footer>
    </article>

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

24 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 “Suggest reply 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

In the middle of an almost black background sits the card of a work chat, the #q4-review channel of the Quaywell app. Teagan Brooks has just written: “Can we move the review to Thursday? The deck still needs the new Q4 numbers.”. At the bottom the reply field, the Send arrow still dim and, on the left, the dark Suggest reply pill with a blue sparkle. The drawn pointer arrives and presses: the pill squashes, a highlight passes under the finger, then it springs back. A light starts running round the border, from blue to white to lilac, with a blurred glow behind it, the sparkle spins, the label rolls to Thinking… and a soft light passes over the message from left to right. Then the light goes out, the label becomes 3 replies and three pills fan out of the button, the nearest first: they start small and tilted, tucked into the button, and open each into its place with a bounce while a glint runs across them. The pointer picks Sure, I’ll add the numbers: the other two drop and fade, the choice flies down into the field and melts where the text begins, which writes itself letter by letter with a blue caret; meanwhile the button folds to just its sparkle to make room. Send lights up blue with a small elastic pop; pressed, the field empties and the reply rises on the right as your own message, with Sent and a tick that draws itself. After a couple of seconds the reply fades upwards and the loop starts again.

How it works

The spinning border

Inside the pill sits a square with a conic gradient that rotates, clipped by the pill’s corners, and over it the dark face one pixel in from the edge: what stays visible is a thread of light running round. A blurred copy behind makes the glow. The button squashes on its wrapper and the gradient spins inside: two elements, two transforms.

The fan

Each pill already sits in its place in the column above the field; as it opens, the distance between it and the button’s sparkle is measured and it starts from there, small and tilted round its bottom left corner, each one a little more. Then it goes back to its place with back.out, the nearest first, and a glint runs across it.

From the pill to the field

The chosen pill flies to where the text starts in the field and melts with a touch of blur; the text writes itself one letter at a time. If the reply is longer than the field, text and caret slide left just enough to keep the end in view.

The button that makes room

While a reply sits in the field, the button’s label goes to zero width and only the sparkle is left; the label changes text by rolling its letters, and the width follows on a soft curve.

Values to change

NameFileDefaultWhat it changes
THINKscript.js1.2The seconds the AI thinks before opening the replies.
FANscript.js1How much the replies fan out as they leave the button (0 they rise straight).
LIGHTscript.js#9ecbffThe colour of the light on the border, the sparkle and Send.
GLOWscript.js1How strong the glow running round the border is (0 none).
TYPE_SPEEDscript.js1How fast the reply writes itself in the field (2 twice as fast).
PRESS_SCALEscript.js0.95How much the button squashes when pressed.
SENT_HOLDscript.js2.2The seconds the sent reply stays before the loop starts again.

Try them in the Playground

When to use it

For suggested replies in a messaging, email, customer support or work chat app with AI: the fan shows where the replies come from, and the choice flying into the field leaves the last word to the person before sending.

On phones

The same animation: the card takes almost the whole width, the pills sit in a column above the field and the reply slides inside the field when it is longer; sizes follow the screen height too.

With reduced motion

No light passing over the message, no fan and no flight: the border lights up and fades, the pills fade in where they belong, the chosen reply appears in the field all at once and the sent one fades in; the drawn pointer stays hidden.

Pitfalls

  • The fan’s starting point is measured as it opens, not at the start: the button’s label changes width and the button moves.
  • The button squashes with GSAP on the wrapper and the light spins inside the button: one element for the scale, one for the rotation, otherwise one transform wipes out the other.
  • Label widths must be measured after document.fonts.ready, otherwise the button takes the width of the fallback font.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 28 October 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