Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozgrozer/react-turkey-map
Customizable Turkey map
https://github.com/ozgrozer/react-turkey-map
harita map react react-turkey-map react-turkiye-haritasi turkey turkey-map turkey-map-react turkey-svg turkiye turkiye-haritasi
Last synced: 18 days ago
JSON representation
Customizable Turkey map
- Host: GitHub
- URL: https://github.com/ozgrozer/react-turkey-map
- Owner: ozgrozer
- License: mit
- Created: 2024-05-30T22:16:41.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-01T20:17:16.000Z (6 months ago)
- Last Synced: 2024-10-11T18:15:07.065Z (about 1 month ago)
- Topics: harita, map, react, react-turkey-map, react-turkiye-haritasi, turkey, turkey-map, turkey-map-react, turkey-svg, turkiye, turkiye-haritasi
- Language: JavaScript
- Homepage: https://react-turkey-map-colorful.vercel.app
- Size: 1.53 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# react-turkey-map
Customizable Turkey map
[![npm](https://img.shields.io/npm/v/react-turkey-map.svg?style=flat-square)](https://www.npmjs.com/package/react-turkey-map)
[![license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/ozgrozer/react-turkey-map/blob/main/license)## Demo
Basic Map
[PlayCode](https://playcode.io/1891552) - [StackBlitz](https://stackblitz.com/edit/react-turkey-map?file=src%2FApp.jsx) - [CodeSandbox](https://codesandbox.io/p/sandbox/react-turkey-map-kwxylt?file=%2Fsrc%2FApp.jsx) - [Vercel (Next.js)](https://react-turkey-map-basic.vercel.app) - [CodePen (UMD)](https://codepen.io/ozgrozer/pen/JjqWEbe?editors=1000) - [JSFiddle (UMD)](https://jsfiddle.net/ozgrozer/314nLwa2/)
Colorful Map
[PlayCode](https://playcode.io/1891656) - [StackBlitz](https://stackblitz.com/edit/react-turkey-map-lemehe?file=src%2FApp.jsx) - [CodeSandbox](https://codesandbox.io/p/sandbox/react-turkey-map-colorful-ds9tj3?file=%2Fsrc%2FApp.jsx) - [Vercel (Next.js)](https://react-turkey-map-colorful.vercel.app/) - [CodePen (UMD)](https://codepen.io/ozgrozer/pen/pomedbP?editors=1000) - [JSFiddle (UMD)](https://jsfiddle.net/ozgrozer/809cmjav/)
## Preview
Basic Map
Colorful Map
## Installation
Install with NPM
```sh
npm install react-turkey-map
```## Usage
```jsx
import TurkeyMap from 'react-turkey-map'export default () => {
return (
)
}
```## Props
```jsx
// types and defaults
showTooltip: bool (default: true)
colorData: object (default: {})
tooltipData: object (default: {})// colorData prop
// plate: city color
colorData={{
'34': '#071E58',
'06': '#253494',
'35': '#253494',
'16': '#253494',
'07': '#225EA8'
}}// tooltipData prop
// plate: city tooltip
tooltipData={{
'34': '15.655.924',
'06': '5.803.482',
'35': '4.479.525',
'16': '3.214.571',
'07': '2.696.249'
}}
```## Contribution
Feel free to contribute. Open a new [issue](https://github.com/ozgrozer/react-turkey-map/issues), or make a [pull request](https://github.com/ozgrozer/react-turkey-map/pulls).
## License
[MIT](https://github.com/ozgrozer/react-turkey-map/blob/main/license)