Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Staggered Hex Cluster Grid Features Block for React

A hexagonal coverage map of nineteen courier zones in offset rows, shaded by demand, with a toggle that re-shades it by orders, wait or couriers and a tooltip on every hexagon.

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 hex-map features section for React with Base UI. Nineteen zones are hexagonal buttons in five offset rows (three, four, five, four, three), cut with a CSS clip-path and shaded in five solid steps of the text colour by how high their number is. A toggle in the header switches the map between orders an hour, wait to pickup and couriers online, and the hexagons re-shade with a transition; pressing a hexagon opens a tooltip with its zone and number. Beside the map, a ranked list names the five highest zones for the current view, and a legend says what the shades mean. Three hairline cells under the map say what the tool does with it. It's built from Toggle Group, Toggle Tooltip and Guides, and it follows your theme. For logistics, delivery and dispatch products, coverage maps and any feature that shows density over places.

FAQ

How do I change the zones and their numbers?

Edit ZONES at the top of the file: each has a name, its three numbers (orders an hour, wait in minutes, couriers online) and its place, c and r, meaning the column in half-hexagon steps (0 to 8) and the row (0 to 4). The shade of each hexagon, the ranked list and the tooltip text are all derived from those numbers, so nothing else needs editing. A different cluster is a different set of c and r values.

How are the hexagons drawn and placed?

Each hexagon is a button with a clip-path polygon, sized as a fifth of the map's width and a quarter of its height, which is exactly a regular hexagon. The offset rows come from the column steps, so the map is placed in percent of one box and scales to any width without a script.

How does the toggle work?

It is a segmented toggle that can't be switched off: pressing the pressed button keeps it, pressing another moves it. The three views share the same hexagons, so only their shade changes, and the hexagon you opened keeps its place.

How do keyboards and screen readers get on?

The map is a named list of zones, and each hexagon is a button whose name includes its number ("Harbor: 164 orders an hour"). Tab reaches them in reading order, and Enter or Space opens the tooltip. The focused or opened hexagon gets a thick border, since a clip-path can't show a focus ring. The ranked list and the legend say the same thing in text.

Does the map mirror in right-to-left languages?

No: a map keeps its places, so the hexagons are dir="ltr". The header, the list and the three cells follow the page's direction.

How does it fit on a phone?

The map scales with its container, so the hexagons shrink to about a fifth of the screen's width and stay large enough to tap. The ranked list sits under it, and the three cells stack one per row.

  • Pro

    A 24 by 12 traffic density grid in a framed figure with a legend, three numbered callout cells, and the callouts described beside it, for a traffic observability tool.

  • 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

    Badge Counter Wall Features

    Metrics and charts

    A wall of eight channel counters for a unified inbox, with a two-button toggle that switches between every channel and only those with unread messages.

  • Pro

    Gauge Cluster Features

    Metrics and charts

    Three semicircle gauges in one framed band, driven by a single "Simulate load" slider: CPU, memory and queue wait, each with a needle, an arc, a reading and a state.

  • Pro

    A 26-week contribution calendar for an engineering analytics tool, with a toggle between merges, reviews and deploys, streak figures and three highlights counted from the series on screen.

  • Pro

    Split Map Canvas Hero

    Diagrams and maps

    A split hero beside a wide map canvas that runs flush to the end rail: eight pulsing office pins and routes between them, with a closing band of three stats.