# react-responsive-maparea

> React component for responsive map-area HTML-tagss

Latest version **1.0.0** (published 2021-11-06) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install react-responsive-maparea
pnpm add react-responsive-maparea
yarn add react-responsive-maparea
bun add react-responsive-maparea
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-11-06 |
| First published | 2021-11-06 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 50.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dergunovd |
| Maintainers | dergunovd |

## Links

- npm: https://www.npmjs.com/package/react-responsive-maparea
- Repository: https://github.com/dergunovd/react-responsive-maparea
- Homepage: https://github.com/dergunovd/react-responsive-maparea#readme
- Issues: https://github.com/dergunovd/react-responsive-maparea/issues
- npm.io page: https://npm.io/package/react-responsive-maparea

## Recent versions

- 1.0.0 (latest) — 2021-11-06

## README

# react-responsive-maparea

> React component for responsive map-area HTML-tags

[![NPM](https://img.shields.io/npm/v/react-responsive-maparea.svg)](https://www.npmjs.com/package/react-responsive-maparea) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-responsive-maparea
```
```bash
yarn add react-responsive-maparea
```

## Usage

```tsx
import React, { Component, useRef } from 'react'
import { Map, Area } from 'react-responsive-maparea'

const Example = () => {
  const imgRef = useRef<HTMLImageElement>(null);

  return (
    <div>
      <Map name='map' imgRef={imgRef}>
        <Area
          shape='rect'
          coords='0,0,100,50'
          href='https://google.com'
        />
      </Map>
      <img
        ref={imgRef}
        useMap='#map'
        src={img}
        alt='MDN infographic resize'
        style={{ width: 200, height: 100 }}
      />
    </div>
  )
}
```

## Possible problems
```tsx
<Area shape='circle'/>
```
Correct works only with saving original aspect ratio

## License

GNU GENERAL PUBLIC LICENSE © [dergunovd](https://github.com/dergunovd)

---
_Source: https://npm.io/package/react-responsive-maparea · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
