# @ng-plus/signature-pad

> An angular wrapper for signature_pad.

Latest version **1.0.7** (published 2020-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ng-plus/signature-pad
pnpm add @ng-plus/signature-pad
yarn add @ng-plus/signature-pad
bun add @ng-plus/signature-pad
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2020-12-30 |
| First published | 2018-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tika Pahadi |
| Maintainers | tika |

## Links

- npm: https://www.npmjs.com/package/@ng-plus/signature-pad
- npm.io page: https://npm.io/package/@ng-plus/signature-pad

## Dependencies (1)

- [signature_pad](https://npm.io/package/signature_pad.md) 3.0.0-beta.2

## Recent versions

- 1.0.7 (latest) — 2020-12-30
- 1.0.6 — 2020-12-30
- 1.0.5 — 2020-12-28
- 1.0.4 — 2020-12-28
- 1.0.3 — 2020-12-28
- 1.0.2 — 2020-12-18
- 0.0.5 — 2018-07-03
- 0.0.4 — 2018-06-27
- 0.0.3 — 2018-06-25
- 0.0.2 — 2018-06-25

## README

# Angular Signature Pad

[See Demo on Stackblitz](https://stackblitz.com/edit/ng-plus-signature-pad?file=src%2Fapp%2Fapp.component.html)

Installation:
```npm
npm install @ng-plus/signature-pad --save
```
Usage (Blob/Image):
```html
<ng-signature-pad (done)="saveImage($event)"></ng-signature-pad>
```

JavaScript:
```typescript
saveImage(blob: Blob) {
    // Do something with the blob.
}
```


#### Options:
| Directives        | Description | Options | Default |
| ------------- | ------------- | ------------- | ------------- |
| `[editable]` | Turn pad on or off | `true`, `false` | `true`
| `[emitOnDragEnd]` | Emit the `(done)` method as soon as drag end. | `true`, `false` | `false`
| `[penColor]` | Color of signature pen | Color | `black`
| `[backgroundColor]` | Background of signature pad | Color | `transparent`
| `(done)` | Fired on clicking `Done` button | `function($event: Blob/base64/json)` | `null`
| `(clear)` | Fired on clicking `Clear` button | `function()` | `null`
| `[(points)]` | JSON points model | json | `null`
| `[format]` | Output format foe `(done)` method. `json` output is same as `points` model. | `blob`, `base64`, `json` | `blob`
| `[width]` | Width of canvas | `number` | `600`
| `[height]` | Height of canvas | `number` | `150`
| `[responsive]` | Resize to 100% parent. But the points will still output `width`x`height` ratio  | `true`, `false` | `true`
| `[showDoneButton]` | Show or Hide Done Button | `true`, `false` | `true`
| `[showClearButton]` | Show or Hide Clear Button | `true`, `false` | `true`
| `[doneButtonText]` | Text of Done Button | `string` | `Done`
| `[clearButtonText]` | Text of Clear Button | `string` | `Clear`
| `[doneButtonClass]` | Class classes of Done Button | `string` | `btn  btn-primary`
| `[clearButtonClass]` | Class classes of Clear Button | `string` | `btn  btn-default`

---
_Source: https://npm.io/package/@ng-plus/signature-pad · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
