Skip to content
animorio
IT
Back to the library

Mind map

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

A mind map: one idea in the middle, three coloured branches around it. Passing over a branch, its three ideas fly out one after the other, each on a thread that stretches with it, while the previous branch’s ideas fold back; every node drifts a little.

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>
<!--
  "Mind map" 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>Mind map</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 mind map: one idea in the middle, three branches around it; pass over a branch and its ideas fly out
         on their threads while the last one folds back; everything drifts a little, as if on a table of water -->
    <section class="mm" data-mm aria-label="Mind map">
      <header class="mm__head">
        <span class="mm__title">Launch plan</span>
        <span class="mm__chip" aria-live="polite"><span data-chip></span></span>
      </header>
      <svg class="mm__map" viewBox="0 0 340 270" data-map>
        <g data-links></g>
        <g data-kids></g>
        <g data-nodes></g>
      </svg>
    </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.

15 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 “Mind map” 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 warm light background, a white card: at the top “Launch plan” and a pill saying which branch is open; below, the map. In the middle the dark node “Launch”, with three curved threads leaving it for three branches, one orange, one blue and one green, each with the number of its ideas. On opening, the threads are drawn from the centre, the branches pop at their ends and the first branch’s ideas come out. Passing over a branch (or tapping it), it fills with its colour and gives a small jolt, its thread thickens, the other two dim, and its three ideas leave it one after the other for their places, growing as they fly and overshooting slightly before settling; each one’s thread stretches with it. The previous branch’s ideas fold back and vanish. Meanwhile every node drifts a couple of pixels, each at its own pace, and the threads follow.

How it works

Nodes around zero

Each node is an SVG group drawn around zero, as wide as its text (getComputedTextLength): position and scale live together in the transform attribute, so it grows from its centre.

One number per idea

Each idea has a number t from 0 to 1: its position lies between the branch and its place, its scale is t, and the thread is a Bézier curve recomputed every frame between the two points. GSAP only animates t, with back.out and a gap of STAGGER seconds.

The drift

On GSAP’s ticker each node moves DRIFT pixels on a sine and a cosine with its own phase; threads and ideas read the branch’s position at that instant, so everything stays attached.

Values to change

NameFileDefaultWhat it changes
STARTscript.js0The branch open at the start: 0, 1 or 2.
OPENscript.js0.65How many seconds an idea takes to leave its branch.
STAGGERscript.js0.08How many seconds pass between one idea and the next.
DRIFTscript.js2.2How many pixels the nodes drift (0 = still).
HOLDscript.js2.1On its own: how many seconds it stays on each branch.
LOOPscript.jstrueLeft alone, a pointer visits the three branches.

Try them in the Playground

When to use it

On the page of a notes app, a shared whiteboard or a project tool, to show how ideas get organised; and on a landing page, to tell a product in three areas with three points each.

On phones

The same piece: branches open on tap, the map scales with the width and never exceeds two thirds of the window’s height.

With reduced motion

No flights, jolts or drift: the chosen branch’s ideas are already in place and the others vanish at once.

Pitfalls

  • The nodes’ positions are hand-written at the top of the script: a real map computes them (a radial tree or a force simulation) and must check that labels do not touch.
  • The branches are SVG groups with role button, tabindex and aria-expanded: they also open with Enter and Space.
  • The nodes’ width is measured from the text, but on a full-size copy: inside a group scaled to zero the browser answers zero. And it must be measured again once the font has loaded (document.fonts.ready).

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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