react-brazil-map
Accessible Brazil map component for React.JS
Table of Contents
Installation
To install, you can use npm:
$ npm install --save react-brazil-map
To install, you can use yarn:
$ yarn add react-brazil-map
Examples
Example of district selection and default style:
import React useState from 'react'import MapBrazil from 'react-brazil-map' { const distritc setDistrict = return <div ='App'> <MapBrazil = /> <p>The selected district was distritc</p> </div> }
Customize the background color, selection color and map outline:
import React from 'react'import MapBrazil from 'react-brazil-map' { return <div ='App'> <MapBrazil ='#6edbdb' ='#000' ='red' /> </div> }
You can also pass a style for the district title, width and height of the map:
import React from 'react'import MapBrazil from 'react-brazil-map' { return <div ='App'> <MapBrazil ='red' = = /> </div> }