is there a library where I can select differnt parts of the image ?

Is there a library where I can select differnt parts of the image ?

Like a user can have a human body in the phone app and a user can select heart/ mouth or shoulder from the image ?

I have done something like this before using an SVG.

Basically I have a bunch of <Path>s and each one has an onPress attribute which sets some state to indicate that the colour of that part should change.

Each <Path> is an outline for something that the user can select. I change the fill colour depending on whether or not the user has pressed that part.

Cool, Could you please give me a link to the example code ?

Here’s a proof of concept:

For some reason the onPress stuff doesn’t work in Snack’s web preview, but it works fine on an Android device. I haven’t tested on iOS. Try tapping the face and the heart.

I used Excalidraw, Inkscape and SVGR to make the SVG.