Skip to content

react-signature-pad 0.0.7

Install from the command line:
Learn more about npm packages
$ npm install @rippling/react-signature-pad@0.0.7
Install via package.json:
"@rippling/react-signature-pad": "0.0.7"

About this version

Rippling

📡 Publish

One time setup to create and set token

Get your personal github token

Create personal token by visiting Github Settings with following scope

Screenshot 2020-05-27 13 19 05

Set token
# Create .npmrc file
cp .npmrc_sample .npmrc
# Replace github-token with actual token
sed -i '' 's/github\-token/xxxxxxxxxxxxxxxxx/g' .npmrc # xxxxxx should be actual github token

Steps to publish to registry

#1 Bump up version in package.json
#2 Publish
npm publish
#3 Ensure you have committed package.json change

Official react-signature-pad documentation

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.

Details


Assets

  • react-signature-pad-0.0.7.tgz

Download activity

  • Total downloads 8
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all