Skip to content

usePaint ​

Category
Browser

Hook that allows you to draw in a specific area

typescript
import { usePaint } from '@siberiacancode/reactuse';

Usage ​

typescript
const drawing = usePaint(canvasRef);

Demo ​

Api ​

Parameters

NameTypeDefaultNote
targetTarget-The target element to be painted
options?UsePaintOptions-The options to be used

Parameters

NameTypeDefaultNote
options?UsePaintOptions-The options to be used

Contributors ​

Source • Demo