Angular Signature Pad | ng-hub-ui-signature

Accessible Angular signature field that stores mouse, touch and pen input as scalable SVG form values, with undo, redo and PNG export.

API reference

Here's the full contract for signature: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial signature in with 9 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
labelstring''Visible field label.
formTextstring''Helper text shown below the drawing surface.
heightnumber160Logical canvas height in CSS pixels.
strokeColorstring'currentColor'Colour recorded in new SVG strokes.
strokeWidthnumber2Base width recorded in new SVG strokes.
readonlybooleanfalsePrevents drawing while preserving the signature.
controlsbooleantrueShows clear, undo and redo actions.
labelsPartial<HubSignatureLabels>{}Overrides the application-wide translated action labels for this field only.
ariaLabelstring'Signature'Accessible name for the drawing surface.

Outputs

React to what signature does — 1 events to hook your logic onto.

NameTypeDescription
valueChangeEventEmitter<string>Emits the SVG value after a user-originated change.

Methods

Drive signature from code — 5 methods on its programmatic surface.

NameSignatureReturnsDescription
clearclear(): voidRemoves every stroke and emits the empty value.
undoundo(): voidRemoves the most recently committed stroke.
redoredo(): voidRestores the most recently undone stroke.
toSvgtoSvg(): stringReturns the scalable SVG form value.
toDataUrltoDataUrl(type?: string): stringExports the rendered signature, PNG by default.

Templates

No templates documented yet.