Skip to content

Signature Pad for Angular

AngularInputs

Captures a handwritten signature with mouse, pen, or touch on a high-DPI canvas with smoothed, pressure- and speed-aware strokes, undo, clear, and PNG or SVG export. A typed-name mode is always available for keyboard and screen-reader users. A Form control: the hidden input carries a PNG or SVG data URL.

  • Natural strokesSmoothed curves whose width follows pen pressure or drawing speed, sharp on high-DPI screens.
  • Typed alternativeA Type mode for keyboard and screen-reader users renders the name as the signature.
  • Undo and clearRemove the last stroke or start over, with spoken confirmation.
  • PNG and SVGExport data URLs or submit them with a native form.
  • Resize safePoints are stored relative to the pad, so the signature rescales with the layout.

Behavior, design tokens, and limitations are described on the Signature Pad page; this page covers the Angular API.

import { Component } from '@angular/core';
import type { SignaturePadValue } from '@absoluteui/components/signature-pad';
import { AuiSignaturePad } from '@absoluteui/angular/signature-pad';
@Component({
selector: 'app-offer-signature',
imports: [AuiSignaturePad],
template: `<aui-signature-pad label="Signature" [required]="true" [(value)]="signature"></aui-signature-pad>`,
})
export class OfferSignatureComponent {
signature: SignaturePadValue = null;
}
Terminal window
npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/theme

Setup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.

import { AuiSignaturePad } from '@absoluteui/angular/signature-pad';

Defaults for every instance: provideAbsoluteUIConfig({ components: { signaturePad: { ... } } }) (see Configuration).

Class AuiSignaturePad; template reference #ref="auiSignaturePad".

Server rendering: Renders on the server; the browser re-creates it after hydration.

Angular forms: implements ControlValueAccessor and Validator; the form value is SignaturePadValue. Bind [formControl], formControlName, or [(ngModel)]; validation messages of the component report through the aui error key. See Forms.

Input Type Default Description
label string Required. Visible label (required accessible name).
hideLabel boolean false Visually hide the label.
description string Help text, referenced by the pad group and the typed field.
penColor string Pen color (CSS color); default the –aui-signature-pad-ink token.
height string '10rem' Pad height (CSS length).
typedFont string Font family for typed signatures (default a cursive family).
mode "type" | "draw" 'draw' Initial mode.
submit SignatureFormat 'png' Hidden input format: ‘png’ or ‘svg’ data URL.
required boolean false A signature must be given.
disabled boolean false Disable the control.
readOnly boolean false Show the signature without editing controls.
name string Form field name (hidden input with the data URL).
validate (value: SignaturePadValue) => string | null Consumer validation; return a message to mark the value invalid.
icons Partial<SignaturePadIcons> Undo, clear, and validation icons.
penWidth number '2.5' Base stroke width in CSS pixels (0.5 to 20).
validationTiming ValidationTiming 'blur' When validation messages appear.
locale string 'en-US' Locale of the messages.
Model Type Change output Description
[(value)] SignaturePadValue (valueChange) The value: [(value)] without forms; with Angular forms, bind the form control instead.
Output Payload Description
(changed) SignaturePadValueDetail After a stroke, a typed change, undo, clear, or a mode switch: { value, validity }. Re-emits aui-change.

Call them through a viewChild query or a template reference.

Method Description
undo(): void Remove the last stroke.
clear(): void Remove the signature.
toDataURL(format?: SignatureFormat | undefined): string | undefined PNG (device pixel ratio, transparent) or SVG data URL.
toSVG(): string | undefined SVG markup of the signature.
getFormValue(): string | null | undefined The submitted data URL, or null when empty.
setCustomError(message: string | null): void Show or clear an external error.
reportValidity(): boolean | undefined Show messages now and return validity.
focus(): void Focus the mode buttons (draw) or the typed field (type).
reset(): void Restore the initial value and clear the validation state.

Pattern: A labelled group with a Draw/Type pair of toggle buttons (aria-pressed), the canvas as role=img whose name describes its content, a native text field for the typed-name alternative, and undo and clear buttons. Drawing is pointer-only, so the typed mode provides the keyboard and screen-reader path (WCAG 2.1.1, 2.5.7).

The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Signature Pad: Accessibility and performance.