agilgur5 / react-signature-canvas

A React wrapper component around signature_pad (in < 150 LoC). Unopinionated and heavily updated fork of react-signature-pad
https://agilgur5.github.io/react-signature-canvas/
Other
539 stars 117 forks source link

Custom CSS properties? (for custom cursor etc) #78

Closed l4b4r4b4b4 closed 2 years ago

l4b4r4b4b4 commented 2 years ago

Is it possible to set a custom cursor as well as other css properties for the SignatureCanvas element? If so, how?

Help would be highly appreciated :)

agilgur5 commented 2 years ago

Yes, per the README this is just a tiny, unopinionated wrapper around a <canvas /> element.

Anything passed to the canvasProps prop will be passed directly to the underlying <canvas /> element's props. Here's the line in the source code for reference.

The "Usage" section also shows an example of your use-case by passing a className through, as does the more detailed official example. You can also pass an inline style by passing a style as you can do with any React DOM elements.