Skip to content
animorio
IT
All components

Team invite form

Forms, HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.7 KBGSAP 28 KBFreeDownload the zip

The form a workspace uses to invite its team, on very light grey: the email addresses typed into the field turn into chips with initials, arriving on a short spring, and the plan’s seats bar stretches with every invite. A wrong address makes the field shake, the X removes a chip and the others close up, Editor and Viewer are chosen with a sliding pill. Press Send and the initials fly in an arc into the team row, the seat count goes up and the button turns green 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>
<!--
  "Team invite form" 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 team invite form</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 invite form of a team workspace: emails turn into chips, the seats fill up and the invites fly into the team -->
    <section class="inv" data-inv aria-label="Invite your team">
      <header class="head">
        <div class="ws">
          <svg class="ws__mark" viewBox="0 0 20 20" aria-hidden="true"><rect x="2" y="2" width="11" height="11" rx="3.2"></rect><rect x="7" y="7" width="11" height="11" rx="3.2"></rect></svg>
          <span class="ws__brand" data-brand>Fernhall</span>
          <span class="ws__sep" aria-hidden="true">/</span>
          <span class="ws__name">Q4 roadmap</span>
        </div>
        <h1 class="title">Invite your team</h1>
        <p class="sub" data-sub>They can edit docs, boards and tasks.</p>
      </header>

      <div class="box" data-box>
        <div class="chips" data-chips>
          <input class="input" data-input type="email" inputmode="email" autocomplete="off" spellcheck="false" placeholder="name@company.com" aria-label="Email addresses">
        </div>
      </div>
      <p class="hint" data-hint aria-live="polite">Press Enter or comma to add</p>

      <div class="role">
        <span class="role__label">Invite as</span>
        <div class="seg" data-seg role="radiogroup" aria-label="Role">
          <span class="seg__pill" data-pill aria-hidden="true"></span>
          <button class="seg__opt" type="button" role="radio" aria-checked="true" data-role="editor">Editor</button>
          <button class="seg__opt" type="button" role="radio" aria-checked="false" data-role="viewer">Viewer</button>
        </div>
      </div>

      <div class="seats">
        <div class="seats__top">
          <span>Seats</span>
          <span class="seats__count"><span class="roll" data-used>2</span> of <span data-total>6</span> used</span>
        </div>
        <div class="seats__bar" aria-hidden="true">
          <span class="seats__pending" data-pending></span>
          <span class="seats__fill" data-fill></span>
        </div>
      </div>

      <footer class="foot">
        <div class="stack" data-stack>
          <span class="av av--a">LR</span>
          <span class="av av--b">JS</span>
        </div>
        <button class="send" type="button" data-send disabled>
          <span class="send__shine" aria-hidden="true"></span>
          <svg class="send__ring" data-ring viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7"></circle></svg>
          <svg class="send__check" data-check viewBox="0 0 20 20" aria-hidden="true"><path d="M4.8 10.4 8.4 14l6.8-7.6" pathLength="1"></path></svg>
          <span class="send__label" data-label>Send invites</span>
        </button>
      </footer>
    </section>

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

35 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 “Team invite form” 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 very light grey background stands the white card of an invented workspace, Fernhall, open on the Q4 roadmap project: the title Invite your team, a grey line saying what the invitees will be able to do, the email field, the choice of role, Editor or Viewer, the plan’s seats bar with 2 of 6 used and at the bottom the team’s initials and the Send invites button, grey and switched off. Type an address and press Enter or comma, and the address becomes a white chip with the initials in a pale blue circle: it arrives from where the text was on a short spring, the circle spins and settles, the button lights up and says how many invites it will send, with the number rolling, and the seats bar stretches in light blue for the ones on their way. A wrong address makes the field shake, turn red and say so below; a duplicate makes its chip jump; once the plan’s seats are used up the field says No seats left on your plan. The X, or Backspace twice, removes a chip and the others close up. Editor and Viewer are chosen with a sliding white pill, and the grey line changes. Press Send and the button spins with Sending, the initials leave the chips one at a time and fly in an arc into the team row, landing with a small bounce, while the seat count goes up; then the button turns green with a check and Invites sent. A drawn pointer does it all by itself, gets one address wrong on purpose, removes an invite, picks Viewer, sends and starts again; it also really works, with keyboard, mouse and touch.

How it works

Chips instead of text

Enter, comma, semicolon, space or Tab close the address: if it passes the check it becomes a new element before the field, and GSAP brings it in with back.out from where the text was, scaled to 72%, while the initials circle turns 40 degrees and settles. An address pasted with commas is split into several chips at once.

Removing and closing up

A removed chip first fades out as it shrinks, then its width, padding and border go to zero: the others move by themselves to close the gap, with no calculations. Backspace on the empty field first marks the last chip and the second time removes it, as in email apps.

The plan’s seats

The bar has two layers: the solid one for seats already taken and a light blue one underneath for pending invites, which stretches on a spring with every chip. When the seats run out the field accepts no more addresses and says so.

The flight into the team

Press Send and for each chip an invisible avatar is added to the team row, its place is measured, and a circle with the initials flies there from the chip on an arc: x and y go from one point to the other, and a sine rising and falling is taken off y, while the circle grows from 22 to 30 pixels. On arrival the real avatar appears with a small bounce and the seat count rolls.

The autopilot

A drawn pointer types the addresses, gets one wrong, fixes it, removes an invite with the X, picks Viewer and sends; the autopilot’s focus is just a class on the field, because focus() would scroll the page holding the card. As soon as the page is really touched the autopilot stops.

Values to change

NameFileDefaultWhat it changes
BRANDscript.js"Fernhall"The name of the invented workspace.
TOTAL_SEATSscript.js6The seats on the plan.
USED_SEATSscript.js2The seats already taken by the team.
SPRINGscript.js1.6How much the chips bounce when they arrive (0 = none).
FLY_ARCscript.js44How high the arc of the invites flying into the team rises, in pixels.
SHAKEscript.js1How much a wrong address shakes (0 = none).
TYPE_SPEEDscript.js1How fast the autopilot types.

Try them in the Playground

When to use it

For the invite step of a team tool, a SaaS app or a back office: whoever invites sees at once who they are adding, with which role and how many seats are left on the plan, and notices a wrong address before sending.

On phones

The same animation: the card is sized on both the width and the height of the box, the grey line under the title hides on short screens and a tap does what the pointer does; the keyboard opens with the at sign already there.

With reduced motion

No springs, flights or shaking: the chips fade in, the wrong address turns red without moving, the initials disappear from the field and fade into the team row.

Pitfalls

  • The autopilot does not call focus() on the real field: in a card inside a page the browser scrolled the whole page to the field.
  • The landing spot of the flight must be measured after adding the avatar to the row, still invisible: measured before, the last invite landed on top of the previous one.
  • A chip closing with width at zero leaves the flex gap behind: a negative margin equal to the gap closes that too.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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