Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Dot Grid Map Logos Block for React

A world map for a freight-forwarding tool, drawn as a grid of dots in a framed figure, with six customer pins at their cities and one chip per region carrying its customer count.

Framework
UI library

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

A global-presence logo map for React with Base UI. Under a centred header, the world is a grid of dots in a framed figure with + marks on its corners, and six customers sit on it as pins at their cities: an icon in a ring that pulses twice when the page loads. Hover a pin and it lifts and opens a card with the customer's wordmark and its city and country. Under the map, one chip per region carries that region's customer count, in a row that wraps from sm and scrolls sideways on a phone. The land is a bitmap at the top of the file, drawn as one SVG path, so there is no image to load and the dots take the theme's colours. The pins are decoration for the pointer and the facts are in text: each pin is a list item that names the customer and its city for a screen reader, and the chips are a list. Built from Badge and Guides, with CSS for the entrance, the pulse and the card.

FAQ

How do I move a pin or add one?

Each entry of PINS has a lat and a lon in degrees, the customer's name, icon and lettering, its city and country, and an anchor for the card (start, center or end, so a card near the map's edge stays on the map). The pin's place on the map is worked out from the coordinates and the bitmap's grid, so a new entry needs nothing else.

How do I draw a different map?

MAP is a list of strings, one per row, where 1 is a dot of land and 0 is sea; each cell is four degrees, 90 columns from the date line and 34 rows from 84 degrees north. Edit the rows to change the shape, or add rows and columns and update DEGREES and NORTH. One path draws every dot, so a bigger map costs only a longer string.

Why doesn't the map mirror in a right-to-left layout?

Geography keeps the Americas on the west side in every language, so the map and its pins sit in a box with dir="ltr". The header, the chips and the page's own lines still follow the page's direction, and the figures in the chips are wrapped in bdi.

Can a keyboard or a touch screen reach the pin cards?

No: the pins are not buttons, so there is nothing to tab through and the card is for the pointer. Nothing is only on the map, though: every pin is a list item that names the customer and its city for a screen reader, and the chips give the regions' counts. If a pin should open something, make it an a to the customer's story and open the card on group-focus-within as well as on hover.

What moves, and what happens with reduced motion?

The header, the map and the chips fade up once when the page loads, each pin pulses twice and stops (it never loops), and the card fades in on hover. With reduced motion the entrance and the pulse are off and the card appears at once.

Do the chips add up to the number in the header?

Yes: the header's total is summed from REGIONS, so it is always the sum of the chips (3,100 here). Change a region's count and the header follows.

  • Pro

    A region picker beside a dot-grid world map for a shipping-label tool: choosing a region lights its land and rolls two figures, labels a day and carriers connected, to that region's values.

  • Pro

    Regional Tabs Logos

    Maps and lists

    Customers of a candle-subscription service by region: four tabs with counts switch a two-column list, each cell a wordmark with its city and country.

  • Pro

    Customers of a land-registry product in four rows, one per region: a label cell with the region, its team count and a thin share bar, then the region's four wordmarks past a hairline.

  • Pro

    A dot-grid world map with a numbered pin on each of six regions, where choosing a region from the list under it rings its pin and rolls the edge locations, latency and uptime to that region.

  • Pro

    A giant static member count for a loyalty platform under a centred header with two buttons, then a band of three secondary figures and a closing strip of eight customer wordmarks.

  • Pro

    A wall of eighteen customer wordmarks for a month-end close tool, under a compact header with the customer count, in cells that share their hairlines from rail to rail.