OGE logoOGE

Signature Pad

A signature capture field — Kendo's and Syncfusion's Signature: draw with a mouse, pen or finger and the strokes are smoothed into curves whose width follows the pen speed. The value is a data: URL of the signature (PNG, or SVG that also carries the strokes so a stored value restores an editable pad).

Type is the keyboard-accessible alternative: a real labelled text field whose text is rendered in a script font into the same export. Works standalone via [(value)], with Signal Forms via [formField], and with reactive/template forms via formControl/ngModel.

pointer + touch PNG / SVG typed alternative forms

Getting started

Draw on the surface; each pen-up commits a PNG data: URL. Undo (or Ctrl+Z while focus is in the pad) removes the last stroke, Escape mid-stroke cancels it, Clear empties the pad. Strokes are stored surface-relative, so resizing redraws the same signature.

value undo Escape cancels

Strokes: 0 · signed: false

Typed signature

The keyboard alternative (WCAG 2.1.1): Type switches to a labelled text field, and the name is rendered in fontFamily into the same export. [(mode)] is two-way; allowTyping hides the switch.

mode: type fontFamily keyboard

Mode: type · signed: false

SVG and pen options

format="svg" exports vector paths and embeds the strokes, so writing a stored value back restores an editable pad. minWidth/maxWidth bound the speed-weighted width, strokeColor and backgroundColor set the ink and the baked-in background, height the surface.

format: svg minWidth / maxWidth toDataUrl()

Inside a form

A FormValueControl and a ControlValueAccessor. A finished stroke marks the control touched, so required shows once the signer has tried; reset() empties the pad.

formControl Validators.required reset()

Valid: false