React Signature Pad
A signature pad implementation for react.
Basic Usage
var React = ;var SignaturePad = ; React
Methods
<SignaturePad clearButton="true" ref="mySignature" />... var signature = thisrefsmySignature; // Methods // ===============================================// isEmpty() - returns boolean// =============================================== signature; // ===============================================// clear() - clears canvas// =============================================== signatureclear; // ===============================================// toDataURL() - retrieves image as a data url// =============================================== signature; // ===============================================// fromDataURL() - writes a base64 image to canvas// =============================================== signature;
CSS
In order to make the signature pad work correctly you will need the css as well. All the relevant styles are in this file.
Example
$ npm start
Then navigate to http://localhost:8080/ in your browser and you should be able to see the signature pad in action.