Mapv1.0.0Documentation Under Review
Interactive map component for visualizing geographic data with markers, popovers, and zoom controls. Built on react-simple-maps with customizable geographies and Catalyst design tokens.
Prefer AI-assisted development?
Catalyst Map wraps react-simple-maps with Catalyst design tokens, interactive geography and marker primitives, and seamless Popover integration — giving you a production-ready geographic visualization with zero additional configuration.
Installation
npm install @pmi/catalyst-mapimport {
MapRoot,
MapGeography,
MapGeographies,
MapGeographyHighlight,
MapMarker,
MapMarkerCircle,
MapZoomableGroup,
MapLine,
MapAnnotation,
MapGraticule,
} from '@pmi/catalyst-map';The Map component requires geographic data in GeoJSON or TopoJSON format. The Catalyst docsite ships an example file at /json/features.json. For custom data, common sources include Natural Earth Data and World Atlas TopoJSON.
API Reference
Map is a compound component built on react-simple-maps primitives. The sections below cover Catalyst-specific sub-components. Passthrough sub-components (MapRoot, MapMarker, MapGeographies, MapZoomableGroup, MapLine, MapAnnotation, MapGraticule) accept all props from the underlying react-simple-maps elements directly.
MapGeography
Renders a single geographic region with interactive visual states.
Prop
Type
MapGeographyHighlight
Overlays a gradient highlight on a geography — typically used to indicate a selected region.
Prop
Type
MapMarkerCircle
A circular SVG marker with hover and active states, designed for placement inside MapMarker.
Prop
Type
Accessibility
Map is designed to meet WCAG 2.2 AA standards.
ARIA
- Interactive geographies and markers are mouse-driven by default. The component does not add
tabIndexor keyboard handlers — if you need keyboard-accessible regions, passtabIndex={0}and anonKeyDownhandler toMapGeographydirectly. - When using
MapMarkerwithPopoverContent, addaria-labelto thePopoverContentto describe the marker's data context (e.g.aria-label="Salary data for United States"). MapGeographyHighlightis decorative — it adds no semantic content and needs no ARIA annotation.- 1.4.3 Contrast (Minimum) — default geography fill and stroke colors (
--surface-primary,--border-neutral-soft) and marker colors meet the 4.5:1 minimum. Verify contrast when applying customclassNameoverrides.
Choosing the Right Component
Use Map when you need to display data tied to geographic locations. Reach for a different primitive when:
| If you need… | Use instead |
|---|---|
| Non-geographic data visualization (bars, lines, pie) | Chart |
Related
Kbd
Display keyboard shortcuts and key combinations with semantic styling. Built on the native HTML kbd element with CVA variants for size, danger state, and decorative vs. text rendering.
Quantity Picker
An accessible increment/decrement control built with CVA variants, four size options, danger state, and full keyboard support.