shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Show each branch and the ATMs it looks after, with this branch network map for React with Base UI. Quillbank, a retail bank, runs eight branches and fourteen ATMs across Chicago, from Lakeview to Hyde Park, each in its real neighbourhood on a live Map that follows your theme, light or dark. The rail of branches at the start is the way in: each row gives the branch's ATM count and what they pay out in a week, and choosing one (or its marker) flies the map to it, curves a spoke out to each of its own ATMs, fills them and labels each with its weekly withdrawals, while the other ATMs stay hollow. The band under the map and the rail names the branch, its services as Badges and its ATMs in three cells; it always keeps three, the most any branch has, so choosing never changes the length of the page. A Toggle Group floating over the map shows branches, ATMs or both, and Show all frames the whole city again. A branch's weekly total is the sum of its ATMs'. Built from Map, Toggle Group, Badge, Button and Guides. For banks, branch managers and network planning.
FAQ
Why are there no spokes in the Branches or ATMs layer?
A spoke needs both ends on the map, so MapArc gets the chosen branch's spokes only when both layers are on, and an empty list otherwise. In the ATMs layer the chosen branch's ATMs still fill in with their amounts, and the band under the map always says the same in words.
Where do the weekly figures come from?
Each ATM in ATM_LINES carries its withdrawals for a week; weekOf adds a branch's own, so the rail, the band and the message read the same sum and nothing is typed twice. In your app take the counts from your ATM switch and the dates they cover.
How does the map move?
The block keeps one aim: the whole city, or the chosen branch with its ATMs. MapCamera frames it, flying to each new one (or jumping when reduced motion is on) and stopping at a street-level zoom; Show all aims at the city again. Pan and zoom freely in between; the next choice aims the camera again.
Can I use it without a mouse?
Yes. Every branch in the rail is a button with a pressed state, the layers are a toggle group, and Show all and the zoom buttons work from the keyboard; the map itself takes the arrow keys and plus and minus once focused. The markers are a pointer shortcut to the same branches. A polite message names the branch, its ATMs, its weekly total and its services once the choice settles.
Is the data real, and what stays local?
The neighbourhoods and streets are real; Quillbank, its branches, its ATMs and every figure are invented, and an ATM is named by its street or neighbourhood, never a business. Nothing is fetched but the map tiles (CARTO's basemaps over OpenStreetMap data, credited in the corner) and nothing is read from a core system or sent.
How does it look on a phone?
The map comes first with the layers over it, then the rail of branches at full width with the network's total under it, then the chosen branch's band with its three ATM cells, right under the list you choose from. Choosing a branch scrolls nothing and keeps the page the same length; scrolling the page over the map scrolls the page, and two fingers move the map.





