Socket
Socket
Sign inDemoInstall

@lemonadejs/signature

Package Overview
Dependencies
1
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lemonadejs/signature

The LemonadeJS JavaScript Signature Pad is a responsive component that simplifies signature capture in web applications. It is compatible with Vanilla JavaScript, React, Vue, and Angular frameworks, allowing users to capture signatures using either mouse


Version published
Maintainers
2
Created

Readme

Source

Javascript Signature Pad

Official website and documentation is here

Compatible with Vanilla JavaScript, LemonadeJS, React, Vue or Angular.

The LemonadeJS JavaScript Signature Pad is a responsive component that simplifies signature capture in web applications. It is compatible with Vanilla JavaScript, React, Vue, and Angular frameworks, allowing users to capture signatures using either mouse or touch input. With convenient methods for loading and retrieving signatures, developers can easily create solutions that empower users to sign documents and securely store their signatures.

Features

  • Lightweight: The lemonade signature pad is only about 2 KBytes;
  • Reactive: Any changes to the underlying data are automatically applied to the HTML, making it easy to keep your grid up-to-date;
  • Integration: It can be used as a standalone library or integrated with any modern framework;

Getting Started

You can install using NPM or using directly from a CDN.

npm Installation

To install it in your project using npm, run the following command:

$ npm install @lemonadejs/signature

CDN

To use data grid via a CDN, include the following script tags in your HTML file:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@lemonadejs/signature/dist/index.min.js"></script>

Configuration

Quick example with Lemonade

import Signature from "@lemonadejs/signature";

export default function Component() {
    const self = this;
    self.width = 400;
    self.height = 200;
    self.value = [];

    return `<Signature
        value="{{self.value}}"
        width="{{self.width}}"
        height="{{self.height}}"
        instructions="Please sign this document" />`;
}

Quick example with React

import React, { useRef } from "react";
import Signature from "@lemonadejs/signature/dist/react";

export default function App() {
    const signature = useRef();
    const width = 400;
    const height = 200;
    const value = [];
    return (
        <>
            <Signature ref={signature} value={value} width={width} height={height} instructions="Please sign this document" />
        </>
    );
}

Quick example with React

<template>
  <Signature ref="signature" :value="[]" :width="400" :height="200" instructions="Please sign this document" />
</template>

<script>
import Signature from '@lemonadejs/signature/dist/vue';

export default {
  name: 'App',
  components: {
      Signature,
  },
};
</script>

Attributes

AttributeTypeDescription
value?ArrayThe value represents the painted point's position.
width?NumberThe width of the signature pad.
height?NumberThe height of the signature pad.
instructions?StringThe instruction text. It appears at the bottom of the signature pad.
line?NumberThe size of each painted point.
disabled?BooleanSignature is disabled if true.
getValueFunctionGets the value array.
setValueFunctionSets the internal state value.
getImageFunctionGets the image based on the value.

Events

EventDescription
onchange?When the value of the component changes
onload?When the component completes loading

License

The LemonadeJS signature pad is released under the MIT.

Other Tools

Keywords

FAQs

Last updated on 11 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc