1.0.7 • Published 2 years ago

@react-simple-maps/usa v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@react-simple-maps/usa

Simple and easy to use map of the usa for React. Quickly display a heat map of the usa.

Install using:

npm i @react-simple-maps/usa

Example usage:

import { USA } from "@react-simple-maps/usa";

function App() {
  const values = {
    size: "50%",
    wi: {
      color: "green",
    },
    tx: {
      color: "blue",
    },
    al: {
      color: "red",
    },
  };
  return (
    <div className="App">
      <h1>Map Demo</h1>
      <USA values={values} />
    </div>
  );
}

export default App;

Result

result map

Props

Props can be passed in to specify the color of the state and the size of the map. Every state is a key in the object. Every state in the object should be abreviated and lowercase. The Props object name and value should be named values.

example object:

{
    size: "50%",
    wi: {
      color: "green",
    },
    tx: {
      color: "blue",
    },
    al: {
      color: "red",
    },
    pa: {
        color: "yellow",
        },
    }
  };

Credits

I would like to thank simple maps for the open source SVG maps.

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago