Skip to content

shadcn.io is an independent project built on shadcn/ui

Spiderfy Map Block for Vue

Places that share an address stack into one marker with a count. Press it and they fan out in a ring or a spiral with leader lines, then fold back.

On this page5 sections
UI library: Ark UI

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show every place at a busy address, with this spiderfy map for Vue with Ark UI. Havenbord, a Rotterdam food and shop guide, puts forty-two places on a live Map that follows your theme, and thirty-seven of them share five addresses: a market hall, a tower block, an office block by the station, a harbour warehouse and a makers' block. Each building is one stacked marker with its count. Press it, on the map or in the card, and the map flies there while its places slide out round the address, a ring for up to eight and a spiral past that, each joined to it by a leader line; the fan is laid out in screen pixels, so it keeps its shape as you zoom. Choose a place on the map or in the card's list to mark it and fill the card with its kind, its stall or floor and how many others share its address. Press the stack again, the Back button, Escape or the map itself, and the fan folds back into the stack. Kinds of place are icons and words (eat, drink, shop), never colour alone. Built from Map, Button and Guides. For city guides, market and mall directories, office and campus finders, and any map where many listings share one address.

FAQ

How are the places laid out when a stack opens?

Around the address in screen pixels, worked out once in the file: up to eight places sit on a ring, its radius growing with the count, and more go round a spiral, each 36 pixels from the last, as the classic spiderfy does. Each place is a marker at the building's own coordinate, moved out by its offset, with a leader line drawn from the address to it, so the fan stays round and readable at any zoom and never covers the wrong street.

How does the fan open and fold?

With CSS only: each place slides out from the address as its line draws, and slides back as it folds, fading away. With reduced motion on, the fan simply appears and disappears. Only one building is open at a time; opening another folds the first.

Can I use it without a mouse?

Yes. The card lists the five buildings and the five places on their own; pressing a building opens its fan, moves focus to its Back button and lists its places, each a button that chooses it. Escape folds the fan, and the zoom buttons, the Show every place button and the map itself (arrows, plus and minus) work from the keyboard. A polite message says what opened, folded or was chosen.

Where does the data come from, and what stays local?

Typed into the file: five real Rotterdam buildings and five streets at their coordinates, and the places in them, which are invented, as is Havenbord. Nothing is fetched but the map tiles, and nothing is sent or saved. In your app, group your listings by a shared address or coordinate to make the stacks.

How does it look on a phone?

The map comes first and the card docks under it with the same lists. An opened building is framed a little further out on the small map, so its fan fits. Scrolling over the map scrolls the page; use two fingers to move it, or hold Ctrl or ⌘ and scroll to zoom on a computer.

How is this different from clustering?

Clusters merge places that are near each other and split as you zoom in. Places at exactly one address never split, however far you zoom, so spiderfy opens them on request instead and leaves every other place where it is.