Skip to content
animorio
IT
Back to the library

Org chart

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.8 KBGSAP 28 KBFreeDownload the zip

The org chart of an HR app: from the card of the person running the company the branches draw themselves, with elbows, and the cards of the three teams and their people arrive on a spring. Hover a person and their path to the top lights up while everyone else dims; a team folds into its lead’s card and opens again, with the head count rolling. In the style of today’s product interfaces.

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>
<!--
  "Org chart" 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 org chart that opens from the top</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 org chart of an HR app: the branches open from the person at the top, the team cards arrive on a spring,
         hovering a person lights up their path to the top, and a team folds into its lead and opens again -->
    <section class="card" data-card aria-label="Team org chart">
      <header class="head">
        <div class="head__left">
          <span class="logo" aria-hidden="true">
            <svg viewBox="0 0 20 20"><path d="M10 3.5v4"></path><path d="M4.5 16.5v-3.2c0-1.4.9-2.3 2.3-2.3h6.4c1.4 0 2.3.9 2.3 2.3v3.2"></path><path d="M10 11v5.5"></path></svg>
          </span>
          <div>
            <p class="head__app">Teamloom</p>
            <h1 class="head__title">Org chart</h1>
          </div>
        </div>
        <p class="head__path" data-path aria-live="polite"></p>
        <p class="head__count" aria-live="polite"><span class="roll" data-shown>13</span> <span>people</span></p>
      </header>

      <div class="chart" data-chart>
        <svg class="links" data-links aria-hidden="true"></svg>
        <div class="people" data-people></div>
        <div class="pointer" data-pointer aria-hidden="true">
          <svg viewBox="0 0 24 24"><path d="M5 3.2 19.4 12l-6.3 1.6-3.3 5.9z"></path></svg>
        </div>
      </div>
    </section>
  </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.

17 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 “Org chart” 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 there is the white card of Teamloom, an invented HR app, with the org chart and, at the top right, how many people are shown, 13. At the top Maya Okafor, Chief executive, with an initials avatar on a warm gradient; below her three leads, Design, Engineering and Growth, each with its own gradient; under each one three people, slightly indented. On arrival the top card settles into place, the branches leave from it and draw themselves as elbows with rounded corners, the leads’ cards arrive on a spring one after the other, a pill with the head count and a chevron pops onto their corners, then the twigs run down along the left edge and the people come in from the left. Hover a person and their path to the top turns indigo and redraws, the cards along the path take a thin indigo ring and the person lifts by two pixels, while everyone else dims. Press a lead’s pill and their three people rise into the lead’s card, the last one first, the twigs retract, the lead’s card gives a small bump, the pill turns black with +3 and the chevron turns; at the top the head count rolls from 13 to 10. Press it again and the team opens on a spring. A drawn pointer does it all by itself and starts again.

How it works

Design units and zoom

The card is laid out in design units, between 360 and 600 wide depending on the space, with the three team columns computed from the width; then the whole card is scaled up or down with zoom so the text stays sharp. On resize everything is redone, even halfway through an animation.

The branches

Every person has their own SVG path, from their parent to them: from the top to the teams an elbow with two eight unit curves, from a team lead to their people a line down the left edge that turns into the card. With pathLength 1 and a dash one long, drawing and retracting them is only moving the dash between 1 and 0.

The path to the top

Hovering a person climbs from parent to parent: every card and branch on the path takes the lit class, the branches redraw a little after one another and the avatars give a small hop. Everything else drops to DIM opacity.

The team that folds

The people move to the centre of the lead’s card, small and transparent, starting from the last one, while their twigs retract upwards; the lead’s card squashes for a moment and comes back on a spring. Opening is the opposite on a spring, with SPRING deciding the bounce. The count at the top is made of two lines that slide.

Values to change

NameFileDefaultWhat it changes
SPRINGscript.js1.6How much the cards bounce when they arrive or when a team opens again.
DRAWscript.js0.5The seconds a branch takes to draw itself.
STAGGERscript.js0.06The time between one card and the next as they arrive.
DIMscript.js0.42How visible everyone else stays when you light up one person.
ACCENTscript.js#4f46e5The colour of the path lit up to the top.
HOLDscript.js1.2The seconds of pause before the autopilot starts again.

Try them in the Playground

When to use it

For a company’s team page, for an HR app or a back office, or to show on a landing page who works on a product and who they report to.

On phones

The same animation: the card is laid out on 360 units and shrinks just enough to fit the width, the three columns stay side by side, and a person lights up when tapped.

With reduced motion

No movement and no springs: the org chart appears with a fade, the path lights up without hops and a team folds and opens by fading.

Pitfalls

  • With round caps a branch hidden by its dash leaves a dot: the branches have butt caps.
  • Measurements are taken after document.fonts.ready and with zoom at 1: measured already scaled, the card shrank twice.
  • GSAP’s lift on the lit card and the lead’s bump live on the transform, the border and the ring are in the CSS: so they do not erase each other.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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