Skip to content
animorio
IT
Back to the library

Breakout rooms

Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.1 KBGSAP 28 KBFreeDownload the zip

Breakout rooms in a video call: with “Open breakout rooms” the eight participant tiles leave the grid and each flies into its room, one room after the other, changing size and settling on a spring. The clock starts running, the host visits a room with the “You” mark landing in it, and “Close rooms” brings everyone back to the main room.

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>
<!--
  "Breakout rooms" 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>Breakout rooms</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">
    <!-- breakout rooms in a video call: the tiles of the main room fly into three rooms,
         the host visits one, the clock runs, and everyone comes back -->
    <section class="br" data-br data-state="main" aria-label="Video call">
      <header class="br__bar">
        <span class="br__title"><strong>Design review</strong><span class="br__sub"><span data-outsub>Main room, 8 people</span></span></span>
        <span class="br__clock" data-clock><svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6"></circle><path d="M8 4.800V8l2.200 1.400"></path></svg><b data-outclock>5:00</b></span>
      </header>
      <div class="br__floor" data-floor>
        <button class="br__room" type="button" data-room aria-pressed="false"><span class="br__name">Research</span><span class="br__n">3</span></button>
        <button class="br__room" type="button" data-room aria-pressed="false"><span class="br__name">Visual</span><span class="br__n">3</span></button>
        <button class="br__room" type="button" data-room aria-pressed="false"><span class="br__name">Copy</span><span class="br__n">2</span></button>
        <span class="br__tile" data-tile data-to="0" style="--h:18"><b>AM</b><i>Ana</i></span>
        <span class="br__tile" data-tile data-to="1" style="--h:205"><b>JO</b><i>Jonas</i></span>
        <span class="br__tile" data-tile data-to="2" style="--h:150"><b>PR</b><i>Priya</i></span>
        <span class="br__tile" data-tile data-to="0" style="--h:262"><b>TK</b><i>Tomo</i></span>
        <span class="br__tile" data-tile data-to="1" style="--h:42"><b>LE</b><i>Lea</i></span>
        <span class="br__tile" data-tile data-to="0" style="--h:330"><b>SB</b><i>Sami</i></span>
        <span class="br__tile" data-tile data-to="2" style="--h:95"><b>NV</b><i>Nico</i></span>
        <span class="br__tile" data-tile data-to="1" style="--h:232"><b>OW</b><i>Ola</i></span>
        <span class="br__host" data-host aria-hidden="true">You</span>
      </div>
      <button class="br__btn" type="button" data-toggle><span class="br__in"><svg viewBox="0 0 20 20" aria-hidden="true"><rect x="2.500" y="3.500" width="6.500" height="5.500" rx="1.600"></rect><rect x="11" y="3.500" width="6.500" height="5.500" rx="1.600"></rect><rect x="6.750" y="11" width="6.500" height="5.500" rx="1.600"></rect></svg><span class="br__word"><span data-outbtn>Open breakout rooms</span></span></span></button>
    </section>
    <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.

38 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 “Breakout rooms” 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 black, a video call panel: at the top “Design review”, “Main room, 8 people” and a dimmed clock at 5:00; in the middle eight coloured tiles with initials and names, in a four by two grid; below, the light pill “Open breakout rooms”. On tap three rooms appear, “Research”, “Visual” and “Copy”, each with its count, and the tiles set off staggered, first those of the first room, then the others: they fly to their places, widen and flatten, tilt slightly in flight and settle on a spring. The line under the title rolls into “3 rooms open”, the clock lights up and counts down, the pill becomes “Close rooms”. Tapping a room turns its border purple and the “You” mark lands next to its name, while the line says “Visiting Visual”; tapping another one makes the mark hop there. “Close rooms”, or time running out, turns the rooms off and takes the eight tiles back to the grid.

How it works

Two layouts, in pixels

From the space available the script works out two places for every tile: the one in the grid and the one in its room, with position, width and height. When the window changes size it works them out again.

The staggered flight

GSAP takes every tile from its old place to the new one on a spring and with a delay: towards the rooms those of the first room leave first, on the way back the grid’s order is followed. A small rotation dies out during the flight.

The clock and the visit

A single number counts the seconds and writes the clock; at zero the rooms close by themselves. The host’s mark is one element, moved next to the name of the chosen room.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#8b7bffThe colour of the room you are visiting and of your mark.
MINUTESscript.js5How many minutes the rooms stay open.
STAGGERscript.js0.045How many seconds pass between one tile and the next.
SPRINGscript.js1How much the tiles bounce as they arrive.
GAPscript.js8The space between tiles and between rooms, in pixels.

Try them in the Playground

When to use it

On the site or in the app of a tool for online meetings, classes and workshops, to show how a group splits up; the same transition carries any move from a grid to groups: a board sorting itself by status, photos gathering into albums, players split into teams.

On phones

The panel is at most 452 pixels wide and narrows with the screen; the tile area is at most 228 pixels tall and never more than 44 per cent of the screen, and both places of every tile are worked out from there. Rooms and button are touch-sized; nothing depends on hover.

With reduced motion

The tiles switch at once from the grid to the rooms and back, with no flight and no rotation; the rooms fade in, the words change without rolling and the “You” mark is already in place. The clock keeps counting, because it tells the time. The demo’s pointer does not start.

Pitfalls

  • The places are in pixels and depend on the space: when the window changes size everything is put back in place without animation, even mid-flight.
  • The tiles’ entrance does not clear their transform at the end: the position lives in there too, and without it they would all end up in the corner.
  • The rooms are real buttons with aria-pressed, reachable by keyboard only while they are open; every change is read out in an aria-live region.
  • People, rooms and times are invented: in a real product the coloured tiles are videos.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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