1.0.0 • Published 2 years ago

@mr-samani/ngx-signature-pad v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

NgxSignaturePad

🎉 Create signature pad for angular projects

📦Demo

🚀demo

Install

  • NPM: npm i @mr-samani/ngx-signature-pad
  • YARN: yarn add @mr-samani/ngx-signature-pad

Usage

Import NgxSignaturePadModule to your working module

import { NgxSignaturePadModule } from ' @mr-samani/ngx-signature-pad';

@NgModule({
  imports: [
    NgxSignaturePadModule
  ]
})
export class AppModule { }

html template:

<ngx-signature-pad #signaturePad (signature)="getSignature($event)"
      [lineStroke]="3" [lineColor]="'#02cb93'"></ngx-signature-pad>

@Inputs

NameTypeDefaultDescription
heightnumber240height of signature pad canvas
widthnumber240width of signature pad canvas
lineStrokenumber3signature line size
lineColorstring"#222222"signature line color
containerStylestring""css style for customize signature canvas

@Outputs \ Events

NameTypeDescription
(signature)EventEmitter<string>Return signature base64 image. Emits when the user mouse up or touch end

clear signature pard

signaturePad.clearSignaturePad();

download signature pard

signaturePad.download();

get file of signature pard

signaturePad.getFile();

Author

💻Mohammadreza samani | FrontEnd Developer

❤️Buy me a coffee 😉