Skip to content

kevinschaul/react-us-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-us-map

NPM

React component for displaying responsive choropleth U.S. maps with tooltips, fills, strokes and more.

Used in The Washington Post’s abortion legislation tracker.

react-us-map-responsive

Installation

npm i --save react-us-map

Usage

Import USMap:

import { USMap } from 'react-us-map'

Then, in JSX, render the component:

<USMap 
    fill={d => d === 'Illinois' ? 'steelblue' : '#eee'}
/>

Props

Control the map styling with props. Most props take a function with the full state name as the only argument.

View full list of props and some examples on Storybook.

Development

To contribute to this tool, first checkout the code. Then install the dependencies:

npm i

To start storybook:

npm run start

To release a new version:

npm version [major | minor | patch]

npm run release

About

React component for displaying responsive U.S. maps with tooltips, fills, strokes and more

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published