Skip to content

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

Compare Regions Map Block for Solid

Press up to three Australian states on a live map to compare them side by side in a table, each with its own pattern, solid, hatched or dotted, on both.

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

Set regions side by side without losing track of which is which, with this compare regions map for Solid with Ark UI. Tallyroo, a rooftop solar installer, shows its 2025 in Australia's six states and two territories, drawn at their real borders on a live Map that follows your theme, light or dark. Press up to three regions on the map, or their buttons above it, and each takes one of three patterns, solid, hatched or dotted, which it keeps on the map (a fill pattern drawn in the text colour, repainted with every theme) and at the head of its column in the table under the map. The table compares them on six measures (installs, system size, price, wait, payback and rating), each value with a bar against the highest in the country, and marks the best of the chosen wherever better means something. A fourth press says to remove one first; a second press, the cross in a column's head or Clear removes a region and frees its pattern for the next. Built from Map, Button and Guides. For market comparisons, territory reviews and any report that weighs places against each other.

FAQ

Why patterns and not colours?

A pattern tells the three regions apart in any theme and for anyone who can't tell colours apart: solid, hatched and dotted read the same in print, in dark mode and in greyscale. The hatch and the dots are small tiles drawn in your theme's text colour and given to the map as fill patterns; they are drawn again when the theme or the preset changes, and the table's swatches are the same patterns in CSS.

Which pattern does a region get?

The first free one, in the order solid, hatched, dotted. Each pattern is a column of the table, so the columns never move: remove the hatched region and its column waits, empty, for the next region you press, which takes the hatch.

How is the best one marked?

With two or more regions chosen, each measure where better means something marks its best value in bold with the word Best: the most installs and the highest rating, the lowest price, wait and payback. System size has no better or worse, so nothing is marked there. Every bar is measured against the highest of all eight regions, so a region's bars stay the same whatever it is compared with.

Where do the borders and figures come from?

The borders are Natural Earth's 1:50m states and territories, simplified so that neighbours still share the same edge, and typed into the file; nothing is fetched but the map's tiles. Tallyroo and every figure in LINES are invented sample data.

Can I use it without a mouse?

Yes. The eight region buttons above the map are toggle buttons in the tab order, each showing its pattern once chosen, followed by Clear and each column's remove button; the map takes the arrow keys and plus and minus once focused. A polite message says which region was added, with its pattern, or removed, or that three are already chosen.

How does it look on a phone?

The region buttons wrap to two rows above the map, and the table keeps its four columns, with each region's code in its head instead of its name; a region is removed with its button or on the map. Scrolling over the map scrolls the page; two fingers pan it.