Skip to content

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

Geo Quiz Map Block for Vue

A ten-round geography quiz on a live map of Europe: name the shaded country or find the named one, with a score, a streak, reveals and a result card.

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

Turn a map into a game, with this geo quiz map for Vue with Ark 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.

How are the score and streaks counted?

The score is right answers out of answers given. The streak is the right answers since the last wrong one, and the best is the longest such run in the game. Switching between Name it and Find it keeps them: the same four countries are in play either way.

How does it look on a phone?

The map comes first with the four in play framed, and the quiz card docks under it, its question view and result view sharing one place, so the page doesn't jump at the end. Scrolling over the map scrolls the page; two fingers pan it.