RE

React Simple Maps

react-simple-maps

React components to build maps with d3-geo, with optional zoom/pan support

Charts
react
maps
charts
worldmap
usa
d3-geo
react-simple-maps
javascript
npm
frontend
Stars
3.4k
Weekly
610k
Open issues
170
Bundle
~25 kB

Installation

npm install react-simple-maps

Code example

import { SimpleMaps } from "react-simple-maps";

const data = [
  { name: "Jan", value: 12 },
  { name: "Feb", value: 18 },
];

export function Example() {
  return (
    <SimpleMaps data={data} width={420} height={240}>
      {/* series / axes from React Simple Maps */}
    </SimpleMaps>
  );
}

Pros & cons

Pros

  • Actively maintained by Richard Zimerman
  • 610k weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 170 open issues on GitHub

FAQs

Alternatives & similar libraries