react-signature-pad
A signature pad implementation for react.

react-signature-pad downloads react-signature-pad version react-signature-pad license

react-signature-padPacchetti simili:
Trend di download npm
3 Anni
🌟 Mostra il grafico di utilizzo in tempo reale nel README.md di react-signature-pad, copia semplicemente il codice qui sotto.
## Usage Trend
[![Usage Trend of react-signature-pad](https://npm-compare.com/img/npm-trend/THREE_YEARS/react-signature-pad.png)](https://npm-compare.com/react-signature-pad#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Mostra il grafico del trend delle GitHub Stars nel README.md di react-signature-pad, copia semplicemente il codice qui sotto.
## GitHub Stars Trend
[![GitHub Stars Trend of react-signature-pad](https://npm-compare.com/img/github-trend/react-signature-pad.png)](https://npm-compare.com/react-signature-pad)
Dettaglio statistiche
Pacchetto
Download
Stars
Dimensione
Issues
Pubblicazione
Licenza
react-signature-pad11,692163-10il y a 9 ansMIT
README per react-signature-pad

npm package

React Signature Pad

A signature pad implementation for react.

Basic Usage

var React = require('react');
var SignaturePad = require('react-signature-pad');

React.render(
  <SignaturePad clearButton="true" />,
  document.body
)

Methods

<SignaturePad clearButton="true" ref="mySignature" />
...

var signature = this.refs.mySignature;

// Methods

// ===============================================
// isEmpty() - returns boolean
// ===============================================

signature.isEmpty();

// ===============================================
// clear() - clears canvas
// ===============================================

signature.clear();

// ===============================================
// toDataURL() - retrieves image as a data url
// ===============================================

signature.toDataURL();

// ===============================================
// fromDataURL() - writes a base64 image to canvas
// ===============================================

signature.fromDataURL(base64String);

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.