shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Open a page with the places you serve, with this hero locations map for React with Base UI. Pedalwain, a same-day cargo-bike delivery service, works in ten European cities, from Lisbon to Copenhagen, each pinned at its real place on a live Map that follows your theme, light or dark. On wide screens the map fills the whole section behind the page's rails, and the headline, the lead and the two buttons, a Shine Button and an outline Button, sit on a soft scrim at the start; the camera measures where the words end and keeps the cities in the open part of the map. On a phone the words come first and the map follows as a band. A city tour floats over the map: it starts by itself, flies to each city in turn and holds it for four seconds with its riders and its time to the door, and after the tenth city it goes back to the whole network and stops. Pause is always visible, the arrows step by hand, and pressing a pin flies to that city. Built from Map, Shine Button, Button and Guides. For delivery and mobility services, marketplaces, coworking networks and any product that launches city by city.
FAQ
Does the city tour run forever?
No. It makes one pass: ten cities, four seconds each with the flight, then the whole network again, and it stops by itself. Pause stops it anywhere and Tour starts it again from the next city. With reduced motion on, it never starts by itself, and the camera moves without flying.
How does the camera keep the cities clear of the words?
On wide screens the block measures where the headline and the buttons end, on load and on every resize, and gives the map's camera that much room on the words' side, so the city being toured sits in the open part of the map. In a right-to-left page the room goes on the other side. On a phone, where the map is a band under the words, the camera only keeps clear of the tour's card.
Will the headline stay readable over the map?
Yes. The scrim is a gradient from the page's own background colour, solid behind the words and fading out across the map, with the map's top fading into the page above, so it follows your theme and the text keeps its contrast in light and dark. The basemap is drawn in your theme's colours too.
Can I use it without a mouse?
Yes. The two buttons are links, and the tour's Previous, Pause and Next are buttons. Stepping by hand reads the city, its riders and its time to the door in a polite message; the tour playing by itself stays quiet. The map takes the arrow keys and plus and minus once focused.
Where does the data come from?
From ten cities typed in the file, each with its riders, its average minutes from pickup to door and the year deliveries began. The cities and their places are real; Pedalwain and its figures are invented sample data, and nothing is fetched or sent. The map tiles are CARTO's basemaps over OpenStreetMap data, with their credit in the map's corner.





