Skip to content
animorio
IT
All components

Invite team button

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

The members row of a project, on white, in the style of clean product interface pieces: next to the row of overlapping avatars sits the black Invite button. Pressed, it opens into an email field with a spring while the avatars squeeze to make room; the typed address, once sent, folds into an avatar with the initials that flies in an arc into the row, the others shift and the last one goes into the +3, which rolls to +4. The field closes back into «Invite sent» with a check.

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>
<!--
  "Invite team 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 Invite team button with avatars joining</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" data-stage>
    <!-- the members row of an invented project app: the avatar stack and the Invite button live together.
         Invite opens into an email field, the address folds into a new avatar that flies into the stack -->
    <section class="team" data-card aria-label="Quillbeck project members">
      <div class="team__head">
        <span class="team__mark" aria-hidden="true">
          <svg viewBox="0 0 24 24"><path d="M5 18.5 12 5l7 13.5Z"></path><path d="M9.2 13.4h5.6"></path></svg>
        </span>
        <div class="team__text">
          <p class="team__name" data-name>Quillbeck</p>
          <p class="team__sub">Website redesign</p>
        </div>
        <span class="team__tag">Members</span>
      </div>

      <div class="row" data-row>
        <div class="stack" data-stack aria-label="Members">
          <span class="more" data-more aria-label="more members"><span class="more__in"><span class="more__plus">+</span><span class="more__num" data-num><span data-num-a>3</span><span data-num-b>4</span></span></span></span>
        </div>

        <div class="invite" data-invite>
          <button class="pill" data-pill type="button" aria-expanded="false">
            <span class="pill__icon" aria-hidden="true">
              <svg viewBox="0 0 24 24">
                <g data-plus><path d="M12 6.5v11"></path><path d="M6.5 12h11"></path></g>
                <path class="pill__check" data-check d="M6.8 12.4l3.4 3.3 7-7.6"></path>
              </svg>
            </span>
            <span class="pill__label" data-label><span data-label-in>Invite</span></span>
          </button>

          <form class="field" data-field aria-hidden="true" autocomplete="off">
            <svg class="field__mail" viewBox="0 0 24 24" aria-hidden="true"><rect x="3.5" y="6" width="17" height="12" rx="2.5"></rect><path d="m4.5 7.5 7.5 5.5 7.5-5.5"></path></svg>
            <input class="field__input" data-input type="email" placeholder="name@company.com" aria-label="Email address" tabindex="-1" spellcheck="false">
            <button class="field__send" data-send type="submit" aria-label="Send invite" tabindex="-1">
              <svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h13"></path><path d="m13 6.5 5.5 5.5L13 17.5"></path></svg>
            </button>
          </form>
        </div>
      </div>

      <p class="team__foot" data-foot><span data-foot-in>4 members, 3 pending</span></p>
    </section>

    <span class="flier" data-flier aria-hidden="true"></span>
    <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.

21 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 “Invite team 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 there is the card of Quillbeck, a made-up project, «Website redesign», with its members row: four avatars with initials on soft coloured circles, overlapping, and a grey «+3» circle. Hovering the row parts the avatars a little on a spring. Next to it sits the black «Invite» pill with a plus: pressed, it squashes and opens into an email field with a purple border while the avatars squeeze to make room. You type an address and press the arrow or Enter: the text becomes a pill in the new member’s colour, folds into a circle with the initials, flies in an arc to the first place in the row and lands with a small bounce; the others shift right and the last one shrinks into the «+3», which rolls to «+4». The field closes back into the pill, the plus turns into a drawn check, the label rolls to «Invite sent» and the line below says who the invite went to; then everything goes back to Invite. A wrong address makes the field shake in red. The drawn pointer does it all by itself and stops at the first touch.

How it works

The row in absolute position

Each avatar is a 36-pixel circle moved with x = index times step: 25 pixels at rest, 31 on hover, 15 when the field is open. Changing the step with back.out parts or squeezes the row like a spring, and the +N always sits after the last one.

The pill that becomes a field

The field starts as wide as the pill and goes to the width left next to the squeezed row with back.out; the pill fades underneath. The width is recomputed on resize.

The address that folds and flies

The sent text goes into an element that starts where the field’s text is: it narrows to 36 pixels, writes the initials, then flies with a linear x and a y in two legs, up then down, to make the arc, to the first place in the row.

The rolling +N

The number has two lines: the old one slides up and the new one comes from below with back.out, while the last avatar shrinks into the circle.

Values to change

NameFileDefaultWhat it changes
PROJECTscript.jsQuillbeckThe project name at the top of the card.
EMAILscript.jsmaya@harrowgate.coThe address the autopilot types and invites.
ACCENTscript.js#4f46e5The colour of the field, the arrow and the check.
SPRINGscript.js0.62The seconds the button takes to open into the field.
FLYscript.js0.85The seconds of the new avatar’s flight to the row.
TYPE_SPEEDscript.js16The letters per second the autopilot types.
HOLDscript.js2.4The seconds «Invite sent» stays.

Try them in the Playground

When to use it

For the settings page of a project app, a team dashboard, a shared workspace, a document to share: anywhere you invite someone and want to see them arrive.

On phones

The card takes 92 per cent of the width up to 372 pixels; when open, the field takes the space left next to the squeezed row, never less than 150 pixels. Touch does what a click does and the phone keyboard types into the field.

With reduced motion

No springs and no flights: the field opens and closes with a fade, the new avatar appears in its place, the number changes without rolling and the drawn pointer is hidden.

Pitfalls

  • The avatars are absolutely positioned: the row’s width has to be animated with the step, otherwise the open field overlaps the avatars.
  • The avatars’ z-index is reassigned after every arrival, because the first one has to sit on top of the others.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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