0.0.1 • Published 4 years ago

react-picture-tagger v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

ReactPictureTagger

It's a react component for tagging pictures...

example screen grab

Could be useful for your data if you're doing something with an r-cnn.

Try it out

https://paulcampbell.github.io/ReactPictureTagger/

How to use it

You can check the example.

Basically something like this:

import ReactPictureTagger from '../../src'

const App = () => {
  const picture = {
    imageSrc: './images/muppets.png',
    imgAlt: 'Image 1',
    tags: [
      { top: 128, left: 5, width: 180, height: 190, name: 'Rizzo' },
    ]
  }

  function tagsUpdated(newTags) {
    console.log(newTags)
  }

  return (
    <ReactPictureTagger
      imageSrc={picture.imageSrc}
      imageAlt={picture.imageAlt}
      tags={picture.tags}
      showTags={true}
      tagsUpdated={tagsUpdated}
      />
  )
}