shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Help someone choose where to live by what's on the doorstep, with this neighborhood guide map for React with Base UI. Hamletly, a relocation guide, maps Barcelona's old town as three neighbourhoods, El Raval, the Gòtic and El Born, each outlined by hand along its real boundary streets (La Rambla, Via Laietana, the Rondas and the Paral·lel) on a live Map that follows your theme, light or dark. Tabs above the map pick what matters, Eat, Shop, Green or Culture, and the map shows that category's places as icon badges, from the Boqueria and the MACBA to the Picasso Museum and the gate of the Ciutadella park. The tab's panel under the map gives each area its count with a bar, the places by name and a Badge saying what the area is best for, worked out from all four counts. Pressing an area flies the camera to it and draws its outline solid; the map button frames the whole old town again. Built from Map, Tabs, Badge, Button and Guides. For relocation services, letting agents, city guides and anyone comparing neighbourhoods.
FAQ
How is each area's best for worked out?
bestOf looks at all four categories and picks the one where the area holds the largest share of the old town's places. El Born has three of the five green spaces, more than its share of anything else, so it's best for green space; El Raval has the most culture spots, four of ten, but its three of seven shops are a bigger share, so it's best for shopping. The badge doesn't change with the tab; it sums up the area.
What do the tabs change?
The map's badges, the map's name and caption, and the panel under the map: each tab has its own panel of three area cells, with the count, a bar measured against the area with the most, and the places by name. Every cell keeps the same height, so switching tabs never moves the page, and an area with none says so.
Are the neighbourhood outlines official?
No. They follow the streets that bound each area, traced by hand from road data and kept to a few dozen corners, close enough for a guide but not a district map. The streets and the landmarks (museums, churches, markets, gardens) are real; Hamletly, the eat and shop picks and the counts are invented sample data.
Does the guide send anything anywhere?
No. The outlines and places are typed in the block, and choosing a tab or an area changes local state only. The map tiles are the one thing loaded, from CARTO's basemaps over OpenStreetMap data, with their credit kept in the corner. In your app feed LINES and OUTLINES from your own listings.
Can I use it without a mouse?
Yes. The tabs move with the arrow keys, each area cell is a button with a pressed state that flies the map there, and the zoom and old-town buttons work from the keyboard; the map itself takes the arrow keys and plus and minus once focused. A polite message gives the counts by area after each choice.





