Skip to content

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

Competitor Analysis Map Block for React

Four Denver shops against three rivals as catchment circles on a live map, a 1 to 4 km slider, contested ground counted and shaded, and rival overlaps.

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

See who owns the ground around your shops, with this competitor analysis map for React with Base UI. Rivalmoor, a retail-planning tool, puts your four shops (lettered circles) and three rivals' (numbered squares) in real Denver neighbourhoods, from the Highlands to Cherry Creek, on a live Map that follows your theme. A Slider floating over the map sets one catchment radius for all of them, from 1 to 4 km: yours are solid circles, theirs dashed, and the camera reframes them once the slider rests. The ground is counted, not guessed: a grid of points about 200 metres apart is tested against every circle, the contested points are shaded on the map as a mosaic, and a segmented bar with three cells under the map gives the share and the area that only you reach, that both reach and that only rivals reach. The rival list says how much of each rival's catchment you share, in square kilometres and as a share of theirs; choosing a rival rings its circle, flies the map to it and lists its overlap with each of your shops. Built from Map, Slider, Button and Guides. For site selection, franchising and retail-planning tools.

FAQ

How are the three areas measured?

SAMPLES is a grid of 64 points across, about 200 metres apart, laid over every shop and the widest catchment round it. For each radius, a point inside one of your circles and one of a rival's is contested, inside only yours is yours, and inside only a rival's is theirs. The shares are whole numbers that add to 100 (sharesOf uses the largest remainder), and the areas multiply the points by the area each one stands for. Every radius the slider can take is counted once, when the module loads.

What do the rival figures mean?

Shared with you is the part of a rival's catchment that any of your catchments also covers; Of theirs is that part as a share of the rival's whole catchment. Choosing a rival breaks it down by shop: how much of each of your four catchments it reaches, or none. Overlaps between your shops' own catchments count once.

What's real, and what stays local?

The neighbourhoods and the map are real; Rivalmoor, the shops, the rivals and every figure are invented sample data. Catchments are straight-line circles, not drive times or footfall. Nothing is fetched but the map's own tiles, and nothing is saved or sent. Swap LINES for your own shops and rivals (a mark, a name, a place and whose it is) and the sample, the cells and the list follow.

Why does the map move?

MapCamera frames every shop and its catchment, and follows a new radius a moment after the slider rests, so a drag doesn't send the map on a dozen flights. Choosing a rival flies to its circle; the frame button beside zoom shows every shop again. It jumps instead of flying when reduced motion is on, and your own pans stay until the next aim.

Can I use it without a mouse?

Yes. The slider takes the arrow keys and reads its value in kilometres, every rival in the list is a button with a pressed state, and the zoom and frame buttons work from the keyboard; the map takes the arrow keys, plus and minus once focused. The rival squares on the map are a pointer shortcut to the same choice. A polite message gives the three shares and the chosen rival's overlaps once the choice settles.

How does it look on a phone?

The slider floats at the top of the map, the three cells keep one row, the rival list keeps its two figures, and the overlap with your shops stacks one shop per line. Every row has a fixed height, so nothing jumps as the radius changes. Scrolling the page over the map scrolls the page; two fingers move the map.