
Description
react-usa-map is a React component that renders an SVG map of the United States, with every state, including DC, Alaska and Hawaii. It is a simple, customizable map for web pages, and it does not need D3. The map uses the Albers projection. Each state is a clickable path, and the component requires an onClick handler. Each path also gets the state's abbreviation with a state class, so you can style states with CSS. Optional props set a title for the svg element, a width and height as numbers without px, a defaultFill color for all states, and a customize option that sets the fill of individual states. The package requires React 16.13.1 or higher and is installed with Yarn or npm. The README includes a usage example with the optional props and a stylesheet, and it links a live demo and the demo's code on GitHub. The map is sourced from Wikimedia under a Creative Commons Attribution-Share Alike 3.0 Unported license, and the package is inspired by react-us-state-map, whose SVG class system it builds on. It is MIT licensed, and contributions are welcome as pull requests.…
Highlights
- SVG map of all US states, including DC, Alaska and Hawaii
- No D3 needed
- Click handler for each state
- Per-state fill customization
- Albers projection
Ratings & Reviews
No ratings yet
Be the first to rate react-usa-map.
People also visit

@vnedyalk0v/react19-simple-maps
An svg map chart component built exclusively for React 19+
react-usa-map FAQ
What is react-usa-map?
A React component that draws an SVG map of the United States with clickable states.
How do I install it?
Run yarn add react-usa-map or npm install react-usa-map --save. It needs React 16.13.1 or higher.
Do I need D3?
No. The README says D3 is not needed.
How do I color the states?
Use the defaultFill prop for a base color, or the customize option to set the fill of individual states.
Where does the map come from?
The README says it is sourced from Wikimedia under a Creative Commons Attribution-Share Alike 3.0 Unported license.
What are the best react-usa-map alternatives?
Popular alternatives to react-usa-map include @vnedyalk0v/react19-simple-maps, visited-map and react-google-maps. See all react-usa-map alternatives












