
Logo loader
Transitions, SVG, Text
The map of a city discovery app, drawn in lines, in the style of real product interface pieces: you tap a pin and the pin itself grows into the place card, with a real photo of the place, the name, the rating, the hours and Directions, while the map slides to put the place in the middle, dims and draws the walking route; on close, the card shrinks back into its pin.
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>
<!--
"Map pin card" 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 map pin that opens into the place card</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 map screen of a city guide app: a pin morphs into the card of its place while the map slides to center it -->
<section class="app" data-app aria-label="Nearwise map">
<div class="map" data-map>
<svg class="map__svg" viewBox="0 0 400 300" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<rect x="-200" y="-150" width="800" height="600" class="m-ground"></rect>
<path class="m-water" d="M-200 228 C -60 214 20 246 110 232 S 260 200 330 214 S 470 236 600 220 L 600 450 L -200 450 Z"></path>
<path class="m-bank" d="M-200 228 C -60 214 20 246 110 232 S 260 200 330 214 S 470 236 600 220"></path>
<g class="m-blocks">
<rect x="-200" y="-150" width="236" height="110" rx="6"></rect>
<rect x="52" y="-150" width="118" height="110" rx="6"></rect>
<rect x="186" y="-150" width="96" height="110" rx="6"></rect>
<rect x="298" y="-150" width="302" height="110" rx="6"></rect>
<rect x="-200" y="-24" width="236" height="96" rx="6"></rect>
<rect x="52" y="-24" width="118" height="40" rx="6"></rect>
<rect x="52" y="30" width="118" height="42" rx="6"></rect>
<rect x="186" y="-24" width="96" height="96" rx="6"></rect>
<rect x="298" y="-24" width="302" height="96" rx="6"></rect>
<rect x="-200" y="88" width="236" height="104" rx="6"></rect>
<rect x="52" y="88" width="118" height="104" rx="6"></rect>
<rect x="298" y="88" width="122" height="104" rx="6"></rect>
<rect x="436" y="88" width="164" height="104" rx="6"></rect>
</g>
<rect class="m-park" x="186" y="88" width="96" height="104" rx="8"></rect>
<g class="m-trees">
<circle cx="204" cy="108" r="6"></circle><circle cx="226" cy="122" r="7.5"></circle><circle cx="252" cy="104" r="5.5"></circle>
<circle cx="264" cy="138" r="7"></circle><circle cx="210" cy="160" r="6.5"></circle><circle cx="240" cy="172" r="5"></circle>
</g>
<path class="m-path" d="M192 182 C 214 160 236 150 276 96"></path>
<g class="m-roads" id="roads">
<path d="M-200 -32H600"></path>
<path d="M-200 80H600"></path>
<path d="M44 -150V228"></path>
<path d="M178 -150V200"></path>
<path d="M290 -150V210"></path>
<path d="M428 80V222"></path>
<path d="M52 23H170"></path>
</g>
<g class="m-names">
<text x="96" y="83">Calder Street</text>
<text x="40" y="150" transform="rotate(-90 40 150)">Wren Avenue</text>
<text x="120" y="250">River Lume</text>
</g>
<g class="m-you" data-you transform="translate(196 80)">
<path d="M0 -7.5 5.8 7 0 4 -5.8 7Z"></path>
</g>
</svg>
<button class="pin" data-pin="0" data-at="122,102" aria-label="Ondine Coffee">
<span class="pin__shape"><span class="pin__body"><svg viewBox="0 0 24 24"><path d="M5 9h11v4.5a5.5 5.5 0 0 1-11 0Z"></path><path d="M16 10.5h1.6a2.3 2.3 0 0 1 0 4.6H15.6"></path><path d="M8.5 3.5c-.8 1 .8 1.8 0 2.8M12 3.5c-.8 1 .8 1.8 0 2.8"></path></svg></span></span>
<span class="pin__name">Ondine Coffee</span>
</button>
<button class="pin" data-pin="1" data-at="238,140" aria-label="Ash Gardens">
<span class="pin__shape"><span class="pin__body"><svg viewBox="0 0 24 24"><path d="M12 20V10"></path><path d="M12 13c-4 0-6-3-6-7 4 0 6 3 6 7Z"></path><path d="M12 11c0-3.5 2-6 6-6 0 4-2 6-6 6Z"></path></svg></span></span>
<span class="pin__name">Ash Gardens</span>
</button>
<button class="pin" data-pin="2" data-at="266,94" aria-label="Paper Moth Books">
<span class="pin__shape"><span class="pin__body"><svg viewBox="0 0 24 24"><path d="M4 5.5c3-1 6-1 8 1v13c-2-2-5-2-8-1Z"></path><path d="M20 5.5c-3-1-6-1-8 1v13c2-2 5-2 8-1Z"></path></svg></span></span>
<span class="pin__name">Paper Moth Books</span>
</button>
<button class="pin" data-pin="3" data-at="132,196" aria-label="Halde Bakery">
<span class="pin__shape"><span class="pin__body"><svg viewBox="0 0 24 24"><path d="M3.5 15c0-5 4-8.5 8.5-8.5S20.5 10 20.5 15c0 1.6-1.2 2.5-3 2.5H6.5c-1.8 0-3-.9-3-2.5Z"></path><path d="M9 9.5l1.4 7.5M14.6 9.2l-1.2 7.8"></path></svg></span></span>
<span class="pin__name">Halde Bakery</span>
</button>
<div class="veil" data-veil></div>
<svg class="route" data-route-svg aria-hidden="true"><path class="route__line" data-route></path></svg>
</div>
<header class="top">
<p class="brand"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 21s-6.5-6.2-6.5-11a6.5 6.5 0 0 1 13 0C18.5 14.8 12 21 12 21Z"></path><path d="M9.6 10l1.7 1.7 3.2-3.4"></path></svg>Nearwise</p>
<p class="search"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="6"></circle><path d="m20 20-4.6-4.6"></path></svg><span>Coffee, books & parks</span></p>
</header>
<!-- the card: the same element grows out of the chosen pin and goes back into it -->
<article class="place" data-place aria-live="polite">
<div class="place__in" data-in>
<div class="place__photo" data-photo>
<img src="caffe.webp" data-ph="cafe" alt="Inside the café: a window seat, hanging lamps and a cup on the table" width="640" height="480" decoding="async">
<img src="parco.webp" data-ph="park" alt="An avenue of trees in autumn, with yellow leaves on the path" width="640" height="427" decoding="async">
<img src="libreria.webp" data-ph="books" alt="Tall wooden shelves full of books" width="640" height="427" decoding="async">
<img src="panetteria.webp" data-ph="bakery" alt="Croissants and pastries behind the bakery glass" width="640" height="427" decoding="async">
</div>
<div class="place__text">
<p class="place__kind" data-kind data-r>Café · 4 min walk</p>
<h2 class="place__name" data-name data-r>Ondine Coffee</h2>
<p class="place__meta" data-r>
<svg class="star" viewBox="0 0 24 24" aria-hidden="true"><path d="m12 3.6 2.5 5.3 5.8.7-4.3 4 1.1 5.7L12 16.5l-5.1 2.8L8 13.6l-4.3-4 5.8-.7Z"></path></svg>
<b data-rate>4.8</b><span data-count>(312)</span>
<span class="sep"></span>
<span class="open" data-open>Open</span><span data-hours>until 18:00</span>
</p>
<div class="place__do" data-r>
<button class="go" data-go><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4.5 11.5 19.5 4.5 12.5 19.5l-1.6-6.4Z"></path></svg><span data-go-label>Directions</span></button>
<button class="save" data-save aria-label="Save place"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 4.5h10v15l-5-3.6-5 3.6Z"></path></svg></button>
</div>
</div>
<button class="close" data-close aria-label="Close"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 7l10 10M17 7 7 17"></path></svg></button>
</div>
</article>
</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>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.
37 values to change
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 “Map pin card” from Animorio and fit it into my siteThe card is a single element above the map: it starts placed exactly on the pin’s drop, with left, top, width and height read from its rectangle, and animates to the final rectangle at the bottom of the screen. The content inside already has the final size and the card crops it, so the text never squashes.
The photo box holds four img tags, one per place, with object-fit cover and their sizes written in the HTML: light 640-pixel webp files under CC0, all loaded with the page. When it fills the card the script turns on only the one of the chosen place, so the photo is already there as the card opens and never flashes. On top, a one-pixel inner edge and a soft light from above, like a print under glass.
The map is 12% bigger than the screen on each side: the shift comes from the distance between the pin and the middle of the free space above the card, and it stops inside that margin, so the edges never show.
The walking route is an SVG path in pixels in the map’s own frame: it goes down from your arrow, turns with two short curves and reaches the pin’s tip. It draws itself with a dash as long as itself.
On close the lines leave first, then the card goes back to the pin’s rectangle and turns black again; only then the real drop reappears, with an elastic squash, and the map goes back to zero.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #2f6bff | The colour of the route, of your position and of the Directions button. |
OPEN | script.js | 0.8 | The seconds of the pin growing into the place card. |
CLOSE | script.js | 0.6 | The seconds of the card shrinking back into its pin. |
SHIFT | script.js | 1 | How far the map moves to center the chosen place (0 = still, 1 = all the way). |
DIM | script.js | 0.42 | How much the map dims under the card (0 = not at all). |
STAGGER | script.js | 0.06 | The delay between one line of the card and the next as they come in. |
HOLD | script.js | 1.8 | The seconds the autopilot waits between one gesture and the next. |
For a city, travel, restaurant or shop app or site with a map: when you want people to see that the card comes from that very spot and goes back there, without losing the map underneath.
The same animation with adapted sizes: the screen takes almost the whole box, the logo keeps only its icon, the card and the buttons get more compact and the card never takes more than just over half the height.
No morph and no movement: the card fades in at its place at the bottom, the map stays still and dims, the route appears already drawn. The drawn pointer is not there.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.4 KB; the libraries: GSAP 28 KB.
Tested on 7 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.