npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lemonadejs/signature

v2.2.1

Published

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

Downloads

231

Readme

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" />`;
}

ReactJS Signature Pad Plugin

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" />
        </>
    );
}

VueJS Signature Pad Plugin

<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>

Web-Component Signature Pad

<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>
<lm-signature width="400" height="200"></lm-signature>

Attributes

| Attribute | Type | Description | |---------------|----------|----------------------------------------------------------------------| | value? | Array | The value represents the painted point's position. | | width? | Number | The width of the signature pad. | | height? | Number | The height of the signature pad. | | instructions? | String | The instruction text. It appears at the bottom of the signature pad. | | line? | Number | The size of each painted point. | | disabled? | Boolean | Signature is disabled if true. | | getValue | Function | Gets the value array. | | setValue | Function | Sets the internal state value. | | getImage | Function | Gets the image based on the value. |

Events

| Event | Description | |-----------|-----------------------------------------| | 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