shadcn.io is an independent project built on shadcn/ui
On this page5 sections
Installation
Overview
Turn a map into a game, with this geo quiz map for React with Base UI. Borderwise, a map-learning app, deals ten rounds on a live Map of Europe with the basemap's place names hidden, so the shapes have to speak for themselves. A Toggle Group picks the kind of question: in Name it, one country is shaded and four names are offered; in Find it, a country is named and four are numbered on the map, and you click the right one or press its number. Either way the map frames the four in play, which are always neighbours, so the choices are close. Every answer reveals at once: the right country shaded solid and named, a wrong pick shaded lighter with a dashed edge and its name, and a sentence that says what was what. The card keeps the score, the current streak and the best, with ten marks for the rounds; after the tenth, a result card lists every country with your answer, the map shows all ten with the missed ones dashed, and Play again deals a new set. Built from Map, Toggle Group, Shine Button and Guides. For classrooms, onboarding games, travel sites and any map that teaches.
FAQ
How are the rounds and choices picked?
A seeded shuffle orders the 38 countries of Europe in the list (Russia and the microstates aside) and the first ten are the game's questions. For each, three of its six nearest neighbours, by label point, are the other choices, and the four are shuffled. Play again moves to the next seed, so every game is different but the same on every load, with no Math.random.
What does it load, and what stays local?
The country borders are Natural Earth's, loaded from a pinned file on jsDelivr, and the basemap's tiles come from CARTO over OpenStreetMap data; the basemap's place names and its own finer borders are hidden while the quiz runs, so each edge is drawn once, and come back when it's removed. The names, label points and mainland boxes are typed into LINES. Your answers and score live in the page only: nothing is sent or saved.
How does Find it work?
The named country is one of four numbered on the map. Click it, click its number pin, or press its number in the card. A click on a country that isn't one of the four only asks you to pick one of them, so a slip never costs a round.
Can I play without a mouse?
Yes. The four answers are buttons in both modes, numbered in Find it to match the pins on the map. After an answer, focus moves to Next; in a new round, to the first answer; at the end, to Play again. The marks for the rounds read right, wrong, now or to come, and a polite message gives each verdict with the score and streak.





