Skip to content
animorio
IT
All components

Pickup point picker

Pickers, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 8.5 KBGSAP 28 KBFreeDownload the zip

The delivery step of Fenwick Supply, a made-up online stationery shop: a Delivery / Pickup control with a white pill sliding on a spring, and on Pickup a small drawn map with three pins, the store, the locker and the newsagent, and below it the list of pickup points with distance and hours. Choosing a point lifts and colours its pin, slides the map to bring it to the middle and draws a border around the row. Pick up here spins a ring and confirms: «Ready Thu after 2 pm». On white, with a single teal accent.

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>
<!--
  "Pickup point picker" 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>Pickup point picker</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 delivery step of Fenwick Supply, a made-up stationery shop: Delivery or Pickup on a segmented control,
         a small drawn map that pans to the chosen pickup point, the list of points with distance and hours,
         and Pick up here, which confirms when the order will be ready -->
    <section class="card" data-card aria-label="Choose how to get your order">
      <span class="card__edge" aria-hidden="true"></span>

      <header class="head">
        <p class="head__eyebrow">Fenwick Supply · Checkout</p>
        <h1 class="head__title">How do you want it?</h1>
      </header>

      <div class="seg" data-seg role="radiogroup" aria-label="Delivery method">
        <span class="seg__pill" data-seg-pill aria-hidden="true"></span>
        <button class="seg__opt" role="radio" aria-checked="true" data-mode="delivery">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M2.5 5.5h9v8h-9zM11.5 8.5h3.2l2.8 2.8v2.2h-6"/><circle cx="6" cy="14.5" r="1.6"/><circle cx="14.2" cy="14.5" r="1.6"/></svg>
          <span>Delivery</span>
        </button>
        <button class="seg__opt" role="radio" aria-checked="false" data-mode="pickup">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 8.2 10 3.5l6.5 4.7V16.5h-13z"/><path d="M8 16.5v-4.5h4v4.5"/></svg>
          <span>Pickup</span>
        </button>
      </div>

      <div class="panels" data-panels>
        <!-- delivery: one quiet row -->
        <div class="panel panel--delivery" data-panel="delivery">
          <div class="addr">
            <span class="tile" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M10 17.2s-5.2-4.6-5.2-8.6a5.2 5.2 0 0 1 10.4 0c0 4-5.2 8.6-5.2 8.6z"/><circle cx="10" cy="8.6" r="1.9"/></svg></span>
            <span class="addr__txt">
              <span class="addr__name">Home</span>
              <span class="addr__line">14 Orchard Lane, flat 3</span>
            </span>
            <span class="addr__price">$4.90</span>
          </div>
          <p class="note">Standard delivery · arrives Thu 4 – Fri 5 Dec</p>
        </div>

        <!-- pickup: the map and the points -->
        <div class="panel panel--pickup" data-panel="pickup" aria-hidden="true">
          <div class="map" data-map aria-hidden="true">
            <svg class="map__svg" viewBox="0 0 320 132" preserveAspectRatio="xMidYMid slice">
              <g data-map-world>
                <rect x="-260" y="-200" width="840" height="540" class="m-land"/>
                <path class="m-park" d="M-40 150 C 10 120, 60 128, 84 160 C 104 188, 60 230, -20 220 Z"/>
                <path class="m-park" d="M230 -30 C 270 -40, 320 -10, 316 30 C 312 60, 268 64, 244 40 C 226 22, 214 -18, 230 -30 Z"/>
                <path class="m-water" d="M-260 40 C -120 20, -40 70, 40 52 C 120 34, 170 -10, 260 -40 C 330 -62, 420 -60, 580 -90"/>
                <g class="m-blocks">
                  <rect x="100" y="104" width="38" height="26" rx="3"/><rect x="160" y="104" width="52" height="30" rx="3"/><rect x="160" y="146" width="56" height="24" rx="3"/>
                  <rect x="232" y="104" width="44" height="34" rx="3"/><rect x="62" y="104" width="26" height="20" rx="3"/><rect x="102" y="30" width="40" height="22" rx="3"/>
                  <rect x="160" y="60" width="40" height="28" rx="3"/><rect x="200" y="20" width="24" height="22" rx="3"/><rect x="-10" y="104" width="44" height="22" rx="3"/>
                  <rect x="310" y="104" width="40" height="40" rx="3"/><rect x="236" y="148" width="40" height="22" rx="3"/><rect x="60" y="62" width="28" height="22" rx="3"/>
                </g>
                <g class="m-roads">
                  <path d="M-260 96 H 580"/>
                  <path d="M-260 180 C 0 170, 200 190, 580 160"/>
                  <path d="M150 -200 V 340"/>
                  <path d="M40 -200 C 50 0, 30 120, 60 340"/>
                  <path d="M300 -200 C 280 0, 300 160, 280 340"/>
                  <path d="M-260 -20 C -60 -10, 120 -40, 580 10"/>
                </g>
                <g class="m-lanes">
                  <path d="M95 96 V 180"/><path d="M220 96 C 222 130, 218 150, 224 176"/><path d="M150 140 H 290"/><path d="M-60 130 H 150"/>
                  <path d="M90 20 H 150"/><path d="M190 50 H 300"/><path d="M-120 96 V 180"/><path d="M360 96 V 165"/>
                </g>
                <!-- where you are -->
                <g class="m-you" transform="translate(150 120)">
                  <circle r="9" class="m-you__halo"/>
                  <path d="M0 -5.2 4.2 4.4 0 2.2 -4.2 4.4z"/>
                </g>
                <!-- the pins: the tip sits on the point -->
                <g class="pin" data-pin="0" transform="translate(118 92)"><ellipse class="pin__shadow" data-pin-shadow cx="0" cy="0" rx="5" ry="1.8"/><g data-pin-body><path class="pin__drop" d="M0 0 C -2 -5, -9 -9.5, -9 -16 A 9 9 0 0 1 9 -16 C 9 -9.5, 2 -5, 0 0 Z"/><path class="pin__glyph" d="M-3.6 -15.2 0 -18.6 3.6 -15.2 V -11.6 H -3.6 Z"/></g></g>
                <g class="pin" data-pin="1" transform="translate(232 64)"><ellipse class="pin__shadow" data-pin-shadow cx="0" cy="0" rx="5" ry="1.8"/><g data-pin-body><path class="pin__drop" d="M0 0 C -2 -5, -9 -9.5, -9 -16 A 9 9 0 0 1 9 -16 C 9 -9.5, 2 -5, 0 0 Z"/><path class="pin__glyph" d="M-3.8 -19.6 H 3.8 V -12.4 H -3.8 Z M 0 -19.6 V -12.4 M -3.8 -16 H 3.8"/></g></g>
                <g class="pin" data-pin="2" transform="translate(56 150)"><ellipse class="pin__shadow" data-pin-shadow cx="0" cy="0" rx="5" ry="1.8"/><g data-pin-body><path class="pin__drop" d="M0 0 C -2 -5, -9 -9.5, -9 -16 A 9 9 0 0 1 9 -16 C 9 -9.5, 2 -5, 0 0 Z"/><path class="pin__glyph" d="M-3.6 -19 H 3.6 V -12.4 H -3.6 Z M -1.8 -16.8 H 1.8 M -1.8 -14.6 H 1.8"/></g></g>
              </g>
            </svg>
            <span class="map__fade"></span>
          </div>

          <ul class="points" data-points role="radiogroup" aria-label="Pickup points">
            <li class="point" data-point="0" role="radio" aria-checked="false" tabindex="0">
              <svg class="point__frame" data-frame aria-hidden="true"><rect data-frame-rect pathLength="1"/></svg>
              <span class="tile" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M4.2 9.2 10 4.4l5.8 4.8V16H4.2z"/><path d="M8.2 16v-3.8h3.6V16"/></svg></span>
              <span class="point__txt">
                <span class="point__name">Fenwick Store</span>
                <span class="point__line">Mill Street · Open until 7 pm</span>
              </span>
              <span class="point__dist">0.4 mi</span>
            </li>
            <li class="point" data-point="1" role="radio" aria-checked="false" tabindex="0">
              <svg class="point__frame" data-frame aria-hidden="true"><rect data-frame-rect pathLength="1"/></svg>
              <span class="tile" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M4.5 4.5h11v11h-11zM10 4.5v11M4.5 10h11"/></svg></span>
              <span class="point__txt">
                <span class="point__name">Parcel Locker</span>
                <span class="point__line">Station Hall · Open 24 hours</span>
              </span>
              <span class="point__dist">0.8 mi</span>
            </li>
            <li class="point" data-point="2" role="radio" aria-checked="false" tabindex="0">
              <svg class="point__frame" data-frame aria-hidden="true"><rect data-frame-rect pathLength="1"/></svg>
              <span class="tile" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M5 4.5h10v11H5zM7.8 8h4.4M7.8 10.6h4.4M7.8 13.2h2.6"/></svg></span>
              <span class="point__txt">
                <span class="point__name">Corner News</span>
                <span class="point__line">Elm Row · Open now, closes 9 pm</span>
              </span>
              <span class="point__dist">1.2 mi</span>
            </li>
          </ul>
        </div>
      </div>

      <button class="go" data-go type="button">
        <span class="go__face go__face--idle" data-face-idle><span data-go-label>Continue to payment</span><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5 10h9.5M10.5 6l4 4-4 4"/></svg></span>
        <span class="go__face go__face--busy" data-face-busy aria-hidden="true"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5" class="go__track"/><path data-ring d="M12 3.5a8.5 8.5 0 0 1 8.5 8.5"/></svg></span>
        <span class="go__face go__face--done" data-face-done aria-hidden="true"><svg viewBox="0 0 20 20"><path data-tick pathLength="1" d="M5 10.4l3.2 3.1L15 6.6"/></svg><span data-done-label>Ready Thu after 2 pm</span></span>
      </button>
    </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.

40 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 “Pickup point picker” 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

The card arrives on Delivery: the home address, the price and the delivery days. Tapping Pickup slides the white pill to the other half on a spring, the address row fades and the space grows to make room for the map and the list, which arrive one after the other. The nearest point is already chosen: its pin rises and turns teal, the shadow under it shrinks and a border draws itself around the row. Choosing the locker slides the map until it sits in the middle, the old pin drops and the new one rises; the old border erases and the new one draws. Pick up here: the label rises and fades, a ring spins, then the button turns teal and says «Ready Thu after 2 pm» with a tick drawing itself. If nobody touches it, the demo does everything by itself and goes back to Delivery.

How it works

Two panels in one cell

Delivery and Pickup sit on top of each other in the same grid cell, whose height is written by the script: to switch panel it measures the one coming in and takes the height there, while one fades and the other enters. The cell has overflow clip, so the taller panel never spills over the button while it closes.

The sliding map

The map is an SVG drawn larger than its window: roads, a river and two parks in a single group. To bring a point to the middle the group moves by the difference between the window’s centre and the tip of the pin, in map units, on a power3.inOut curve.

The border that draws itself

Around each row there is an SVG rectangle with pathLength 1 and a dashed stroke: its size in pixels is recomputed on every resize (no vector-effect, which with pathLength would draw it halfway), and stroke-dashoffset goes from 1 to 0 with autoRound off.

Values to change

NameFileDefaultWhat it changes
START_MODEscript.js"delivery"Where the demo starts: «delivery» or «pickup».
READY_TEXTscript.js"Ready Thu after 2 pm"What the button says once the pickup point is confirmed.
PIN_LIFTscript.js5How many map units the chosen pin rises.
SPRINGscript.js0.5How springy the pill, the pins and the button are (lower = more bounce).
PAN_TIMEscript.js0.85Seconds the map takes to slide to the chosen point.
DRAW_TIMEscript.js0.55Seconds the frame of the chosen row takes to draw itself.
CONFIRM_TIMEscript.js1.1Seconds the ring spins before the pickup is confirmed.
AUTO_PAUSEscript.js1.2Seconds the demo waits before it starts over.
IDLEscript.js6Seconds after your last touch before the demo plays by itself again.

Try them in the Playground

When to use it

At the delivery step of an online shop with stores, lockers or pickup points: it lets people choose the point looking at the list and the map together, and says right away when the order will be ready.

On phones

Everything is in em and the size depends on both the width and the height of the window, so the card with the map and the list fits the phone box. The rows are tall enough for a thumb and are chosen with a tap.

With reduced motion

No springs or movement: the pill, the map and the pins go to their place at once, the panels and the button faces change with a fade.

Pitfalls

  • The button faces are absolutely positioned, each centred on its own: no hidden label widens the button and the ring stays in the middle.
  • The ring spins with svgOrigin on its centre in the viewBox (12 12), because it is a path inside the svg.
  • The frame rectangle has its pixel size recomputed on resize: with vector-effect and pathLength together it would draw halfway.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 1 December 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 components