Skip to content
animorio
IT
Back to the library

The spirograph logo

Intro, SVGGSAPMediumCompressed weight: Demo 8.3 KBGSAP 28 KBFreeDownload the zip

A minimal logo intro with one gesture: the toothed ring of a spirograph is laid on the sheet, a small wheel drops into it and catches the teeth, the pen goes into its hole and the wheel rolls round inside the ring. The pen leaves a rosette behind it in the accent colour, closing where it began; the wheel rolls a hair past and back, comes off the paper, the ring undraws itself and the rosette, left alone, gains weight. Then the rule under the logo stretches out and the name beside it gains weight letter by letter. In the Playground you choose the name, how many petals and where the pen sits in the wheel.

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>
<!--
  "The spirograph logo" 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 spirograph logo</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/roboto-flex@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="scena">
    <!-- the stage: the script measures it, lays the toothed ring on the sheet and rolls the wheel inside it -->
    <svg class="palco" data-stage role="img" aria-label="Gyra" xmlns="http://www.w3.org/2000/svg">
      <!-- the ring the wheel rolls in, with its fine teeth -->
      <g data-ring>
        <path class="dente" data-teeth />
        <circle class="anello" data-ring-line />
      </g>
      <!-- the rosette the pen leaves: the mark -->
      <g data-mark>
        <path class="traccia" data-trace />
      </g>
      <!-- the wheel, drawn in thin lines, with the pen in one of its holes -->
      <g data-wheel>
        <circle class="ruota" data-wheel-line />
        <circle class="foro" data-wheel-hub />
        <path class="raggio" data-spoke />
        <circle class="penna" data-pen />
      </g>
      <!-- the thin rule under the logo -->
      <path class="riga" data-rule />
      <!-- the name, one tspan per letter -->
      <text class="nome" data-name></text>
    </svg>
    <p class="nota" data-note>Click or tap to draw it again</p>
  </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.

13 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 “The spirograph logo” 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 an empty warm white ground a very thin grey circle draws itself, starting at the top and going clockwise, and around it its teeth appear, many short fine ticks: it is the ring of a spirograph. From above, lifted a little off the paper and slightly bigger, a wheel drawn in a thin black line comes down, with its hub and a fine spoke; it touches the sheet, presses a hair against the teeth and settles with a small spring. The pen goes into its hole, a little green circle that opens with a bounce. Then the wheel starts to roll round inside the ring: slowly, then steadily, and the pen leaves a thin green line behind it that loops out and back towards the middle, trip after trip, until the five-petal rosette closes exactly where it began. The wheel rolls a whisker past and springs back, the pen comes out of its hole, the wheel lifts, growing a little, and vanishes, the teeth go out and the ring undraws itself. The rosette left alone gains weight: the line gets thicker, passes its size by a whisker and settles, while the drawing swells by a pixel and turns a degree before coming straight again. A thin rule stretches out under the logo, runs a little past and comes back; the name Gyra, the made-up brand, arrives letter by letter, first hair-thin and narrow, then wide and full; when the last letter lands the rule gives a pixel and springs straight. Once the logo is on show, the pointer over the rosette turns it a few degrees on a spring, as if the sheet moved, a press squeezes it slightly and a click draws it again. After a few seconds the name goes thin, the rule pulls back, the rosette thins out and fades, and it all starts again.

How it works

A curve from two circles

The rosette is a hypotrochoid: the point of a wheel of radius r rolling inside a ring of radius R, at a distance d from the wheel's centre. In tooth units, x = (R − r) cos t + d cos((R − r) / r · t) and y = (R − r) sin t − d sin((R − r) / r · t). With R equal to the number of petals and r coprime with R, the pen comes back to its start after exactly r trips round the ring: the TURNS table picks the wheel for each number of petals, and the curve is turned a quarter so that it starts at the top.

One size

The stage is an SVG whose viewBox is as big as the window, so one unit is one pixel. Everything is counted in rosette widths: the name has a cap height of 0.36 rosettes and is centred on its height, the rule sits 0.16 rosettes below its foot. The ring is wider than the rosette (the ratio is R divided by the pen's furthest reach), so the room is counted with the ring. If it does not fit in a row the name goes underneath, and a long name may get smaller without shrinking the drawing.

The line drawing itself

The path is not revealed with stroke-dashoffset: on every frame the place function rebuilds it up to where the pen has got, 160 points per trip, and closes it with Z at the end. The wheel and the pen follow the same number t, with one difference: the wheel goes 0.035 radians past the closing point and an elastic.out brings it back, while the line stops exactly at the end, so the rosette never draws over itself.

Weight and touch

The drawing gains weight through its stroke: from 1 pixel to a little past its final value with power2.inOut, then an elastic.out brings it back; at the same time the group swells by 1 per cent and turns a degree. The name is a single text with one tspan per letter in Roboto Flex, with font-variation-settings written every frame. The pointer, the touch and the click only answer once the logo is on show, between the labels rest and leave: before that a click does nothing, so the intro is never cut off halfway.

Values to change

NameFileDefaultWhat it changes
NAMEscript.js'Gyra'The name beside the rosette: it gains weight letter by letter. Empty, only the rosette stays.
WEIGHTscript.js620How heavy the name gets in the end: 300 is light, 900 is black.
PETALSscript.js5How many petals the rosette has, from 3 to 9: with more petals the wheel goes round the ring more times.
DEPTHscript.js0.8Where the pen sits in the wheel: 0.3 near the middle (a soft wave), 1 at the rim (tight, sharp loops).
LINEscript.js1How thick the rosette's line gets in the end: 0.5 fine, 2 bold.
SPEEDscript.js1The speed of the whole animation: 2 is twice as fast, 0.5 half as fast.
RESTscript.js4How many seconds the logo stays on show before it starts again.
LOOPscript.jstrueWhether the logo fades and the rosette is drawn again. With false the logo stays.

Try them in the Playground

When to use it

To present a logo with a precise, slightly playful gesture: the opening of a graphic design studio's site, an agency, a jewellery or textile brand with a rosette motif, an art school, a stationery shop, a portfolio, a loading screen, a preview for a client, a social post. It suits pages where everything else is quiet.

On phones

The same animation with the sizes adapted: on a narrow screen the name goes under the rosette, centred, with the rule under it; a long name gets smaller and the drawing stays big. Once the logo is on show a tap draws it again.

With reduced motion

Nothing moves: the rosette fades in already drawn and at its weight, then the rule and the name already at their weight. If the animation starts again, the logo leaves with a fade too.

Pitfalls

  • With the wheel stopping exactly at the closing point the gesture looked mechanical; with the wheel going past and back, the line went past too and started the first loop again over itself. Now the wheel and the line have two separate tweens on the same t: the line stops at the end, only the wheel springs.
  • A number of petals that shares a factor with the wheel gives a curve that closes early with fewer petals (6 petals with a wheel of 4 makes 3): the TURNS table picks, for each number, a wheel coprime with it.
  • The ring is wider than the rosette: counting the room on the rosette alone pushed the ring out of the phone's preview box during the intro. The row and column sizes count the ring.

Libraries

GSAP 3.15.0, Roboto Flex (font variabile) 5.3.0.

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

Testing

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