Build one Human Body figure inyour web Page using React. Show the parts you want and click on them to select it.
npm install @darshanpatel2608/human-body-reactBuild one Human Body figure inyour web Page using React.
Show the parts you want and click on them to select it.
| Name | Type | Description | Default |
|---|---|---|---|
| partsInput | object | Parts Parameters | None |
| onChange | function | Function trigger on change in parts, gives one argument parts | None |
| onClick | function | Function trigger on click in parts, gives one argument id of clicked part | None |
| mode | string | missing | pain, Mode of operation: missing mode is smart mode | pain |
| height | string | Height of body div | 510px |
| width | string | Width of body div | 207px |
| Name | Type | Description | Default |
|---|---|---|---|
| selected | boolean | Body Part is selected or not | false |
| clickable | boolean | Body Part can be selected or not | true |
| show | boolean | Body Part is visible or not | true |
| custom values | any | Any other value param to be used (can be retrived with onChange) | ... |
| head | chest | stomach | left_shoulder |
| left_arm | left_hand | right_shoulder | left_leg_lower |
| right_arm | right_hand | left_leg_upper | left_foot |
| right_leg_upper | right_leg_lower | right_foot |
``tsx
const exampleParams = {
head: { selected: true },
left_arm: { show: false }
}
export const App: VFC = () => {
const [params, setParams] = useState
return (
)}
)
}
``