1.0.0 • Published 9 months ago

react-img-map-area v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

React Image Map Area

A react custom hook that makes HTML Image Maps responsive, automatically stay scaled to the size of the image they are attached to. It detects the window being resized and updates the co-ordinates of the image map accordingly.

Usage

import useImgMapArea from 'react-img-map-area'

export default function MyComponent() {

  useImgMapArea()

  return (
    <>
      <img src='...' useMap='#myMap'/>
      <map name='myMap'></map>
    </>
  )
}
1.0.0

9 months ago