Skip to content
animorio
IT
Back to the library

Shipping map

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

The «Ships worldwide» section of Halvard Ceramics, a made-up online ceramics shop: a world map made of grey dots, only where there is land, and from the Copenhagen warehouse thin arcs leaving one after the other for the cities of the orders, with the parcel at their tip. On arrival the city lights up with a ring that opens once, the dots around it catch the colour and the card with the delivery days appears; at the top «Orders today» and «Countries» roll up digit by digit. On hover a city shows its card and its arc, the rest steps back.

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>
<!--
  "Shipping 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>Shipping 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">
    <!-- the "Ships worldwide" section of Halvard, a made-up ceramics shop: a world map made of a regular grid of grey
         dots (only where there is land), arcs that leave the Copenhagen studio one after the other, a parcel riding
         each arc, the city lighting up once with a ring, its card, and the two counters rolling up -->
    <section class="ship" data-ship aria-labelledby="ship-title">
      <header class="ship__head">
        <div class="ship__intro">
          <p class="ship__brand">Halvard Ceramics</p>
          <h2 class="ship__title" id="ship-title">Ships worldwide</h2>
          <p class="ship__sub">Packed by hand in Copenhagen, tracked to your door.</p>
        </div>
        <dl class="ship__stats">
          <div class="stat"><dt>Orders today</dt><dd class="stat__num" data-orders></dd></div>
          <div class="stat"><dt>Countries</dt><dd class="stat__num" data-countries></dd></div>
        </dl>
      </header>

      <div class="map" data-map>
        <svg class="map__svg" data-svg viewBox="0 0 110 42" aria-hidden="true">
          <path class="map__land" data-land></path>
          <g data-halos></g>
          <g class="map__arcs" data-arcs></g>
          <g data-rings></g>
          <g data-cities></g>
          <g class="map__home" data-home>
            <rect class="map__home-shadow" data-home-shadow></rect>
            <rect class="map__home-box" data-home-box></rect>
          </g>
          <g data-parcels></g>
        </svg>
        <div class="map__pins" data-pins></div>
        <p class="map__from" data-from><span>Copenhagen</span> studio</p>
      </div>

      <footer class="ship__foot">
        <span>Free shipping over €120</span>
        <span class="ship__sep" aria-hidden="true"></span>
        <span>Duties included</span>
        <span class="ship__sep" aria-hidden="true"></span>
        <span>Tracked and insured</span>
      </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>
    <p class="sr" aria-live="polite" data-live></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.

27 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 “Shipping 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 white page sits a light paper panel with a one pixel edge and three soft shadows: the «Ships worldwide» section of Halvard Ceramics, a made-up online ceramics shop. At the top the brand in orange, the title and the line «Packed by hand in Copenhagen, tracked to your door.»; on the right two counters, «Orders today» and «Countries». Below, the world map is a regular grid of grey dots, only where there is land (real Natural Earth data, reduced to 110 columns by 42 rows, Antarctica cut), and in Copenhagen a small dark square, the warehouse, with its label. On entrance the panel rises, the dots develop from west to east and the counters roll from zeros to the day's numbers. Then, one every 1.45 s, the orders leave: the square squeezes and springs back, a thin orange arc draws itself toward the city with the parcel at its tip, which grows a little at the top of the flight while its faint shadow runs below in a straight line. On arrival the parcel goes, the city lights up with a dot that bounces, a ring opens once and fades, the land dots around it catch the colour in a three band ripple, and beside it the city card opens («Lisbon», «Delivered in 3 days») with the box settling; «Orders today» goes up and, for a new country, «Countries» too, with the last digit coloured for an instant. The arc then fades and stays. After six orders (Lisbon, New York, São Paulo, Dubai, Tokyo, Sydney) a drawn pointer reads New York and Tokyo: the chosen city shows its card, its arc gets bolder and full, the other arcs and cities step back. Then the map clears, the counters roll back and it starts again. With the mouse over a city the same happens; on the phone you tap, with the keyboard you reach it with Tab.

How it works

Dots from the real map

The land is not drawn by hand: the Natural Earth 1:110m outlines (world-atlas, TopoJSON) were tested once, outside the demo, against a grid of 110 columns by 42 rows in an equirectangular projection, with five samples per cell so small islands do not vanish. Only the result stays in the demo: one row of hex digits per row of dots, four dots per digit. No extra library.

One path for all the land

Every dot is a zero length segment ('M x y h0') with a round cap: the stroke width becomes the dot's diameter. Nearly two thousand dots are one SVG element, which scales with the viewBox and costs nothing. The entrance is a clipPath that opens from west to east.

The arc with the parcel at its tip

Each arc is a quadratic curve from the warehouse to the city, with the control point raised by a third of the distance, and pathLength='1'. A plain object { p } goes from 0 to 1 with power2.inOut and every frame writes the stroke-dashoffset (1 - p) and puts the parcel at getPointAtLength(p * length): the parcel grows by 28% at the top of the flight and its shadow runs on the straight line below. With autoRound off, or GSAP rounds the dashoffset to 0 or 1.

The arrival: one ring and the ripple

The ring opens from 3 to 13 pixels and fades in .95 s, once: nothing pulses. The land dots within four cells of the city are already split into three paths by distance, and light up one after the other .11 s apart: it looks like a wave passing over the land. The counters are one line windows with a column from 0 to 9 twice inside, so a 9 turning into 0 keeps rolling up.

Pixels that stay pixels

The viewBox scales everything together, but lines, dots and rings must stay a few pixels even on the phone: a ResizeObserver measures how many pixels a cell is worth and writes into CSS variables the width of the arcs, the rims and the dots (never under 1.7 pixels). The card is placed by CSS in percent and moved by GSAP on its child, so GSAP's transform does not wipe out the placement.

Values to change

NameFileDefaultWhat it changes
ARC_TIMEscript.js1.3Seconds for an arc to draw, with the parcel at its tip.
GAPscript.js1.45Seconds between one order leaving and the next.
ARC_HEIGHTscript.js0.34How high the arcs rise, as a share of their length.
RESTscript.js0.42How visible an arc stays after its parcel has landed (0 to 1).
RINGscript.js13Pixels the ring opens to around a city on arrival.
HALOscript.js4.2How far the ripple on the dots around a city reaches, in dots.
DOT_SIZEscript.js0.44The size of a land dot, as a share of the space between two dots.
LINEscript.js1.3The thickness of the arcs, in pixels.
LOOPscript.jstrueClear the map and send the orders again.

Try them in the Playground

When to use it

For the shipping section of an online shop that sells worldwide, the «Shipping» page or the band above the footer; also for the numbers page of a logistics startup or a service with customers in many countries.

On phones

The same, with the same arcs and the same timing. The title and the counters stack, the map takes the whole width of the panel and the dots never go under 1.7 pixels. A tap on a city opens its card, another tap closes it.

With reduced motion

The arcs are already drawn, the cities already lit and the counters already at the day's numbers: no parcels travelling, no rings or ripples. The city cards fade in and out one after the other.

Pitfalls

  • The world-atlas data has Russia crossing the antimeridian: point in polygon without «unwrapping» the longitudes filled the whole Arctic with land. The outline's longitudes are made continuous and the point is also tested at plus and minus 360 degrees.
  • With the viewBox everything scales together: without working the stroke width out again on resize, arcs become hairs on the phone and ropes on the computer. The pixel widths are rewritten in map units by a ResizeObserver.
  • GSAP animates the arcs' stroke-opacity and CSS their opacity for the hover: on the same property the CSS transition would drag every GSAP tween.
  • The card is placed with a CSS transform: the animation goes on its child, or GSAP's first tween drops it in the corner of the map.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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