Skip to content

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

Market Expansion Map Block for React

Eleven European cities ranked on a live map by three weights, demand, income and rivalry, with the top three ringed and cards that split every score.

On this page5 sections

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

Weigh a launch before you commit to it, with this market expansion map for React with Base UI. Stridewick, a growth-strategy tool, puts fifteen European cities at their real places on a live Map that follows your theme: four live markets (small squares) and eleven candidates, each marker carrying its rank. Three Sliders over the map, Demand, Income and Rivalry from 0 to 5, weight three typed indicators that are already scaled 0 to 100 (rivalry counts in reverse, so fewer rivals score higher); a city's score is the weighted average and every candidate is re-ranked as a slider moves. The top three get a heavy ring and their names on the map. Under the map, a row of cards in the map's west-to-east order gives each candidate its rank and score and splits the score into its three parts, whole points that add up to it, on one stacked bar. Choosing a card or a marker marks both and slides the card into view. Built from Map, Slider and Guides. For expansion, retail-planning and strategy tools.

FAQ

How is a score worked out?

Each weight multiplies its indicator (demand, income, and 100 minus rivalry), and the sum is divided by the total weight, so a score stays between 0 and 100. The three parts are rounded down and the spare points go to the largest remainders, so they always add up to the rounded score. With every weight at zero nothing is ranked and the row says so.

Why do the live markets have no rank?

They are already open, so only the eleven candidates are ranked; the live markets are drawn as small squares and named in the caption, so you can see where a candidate sits against what you run today. Ties are broken by the unrounded score, then by name.

Why are the cards not in rank order?

They follow the map from west to east, Lisbon first and Warsaw last, so a card stays in the same place as the weights change and its marker is easy to find. The rank is on every card and every marker, and the top three are named above the row.

How do I use my own cities, and what stays local?

Edit LINES: the city, the country, its longitude and latitude, the three indicators scaled 0 to 100, and a 1 for a live market. In your app compute the indicators from your own data, for example a percentile among the candidates, and keep exactOf and partsOf. Everything runs in the page; nothing is saved or sent, and the only network traffic is the map's tiles.

Can I use it without a mouse?

Yes. Each slider takes the arrow keys and speaks its value out of 5, and every card is a button with a pressed state; the markers are a pointer shortcut to the same choice. The map's zoom buttons work from the keyboard, and a polite message names the top three and the chosen city once the sliders settle.

How does it look on a phone?

The three sliders stack over the map, the map keeps the ranks on its markers (the names move to the cards), and the cards scroll sideways in a row that snaps to each one. Nothing changes height as the weights move.