Skip to content

SignaturePad ​

Draw a signature on canvas

A drawn signature, for a delivery receipt, a consent form, a sign-off. It can only be drawn with a pointer, so always offer another way: a typed full name, or a checkbox that says the same thing.

Basic
Sign above

Counts the same as a signature

  • v-model is a data URL of the drawing (type sets PNG, JPEG or WebP), empty while blank. @end fires after each stroke.
  • The drawing survives a resize (a phone turning, a sidebar opening). Clear with the button, the Delete key, or ref.clear().
  • Strokes take the text colour unless color is set. hint and clearLabel set the copy.

Usage ​

ts
import { BlessSignaturePad } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
heightnumber160
lineWidthnumber2
colorstring—
labelstring"Signature"
clearLabelstring"Clear"
hintstring"Sign above"shown under an empty pad
disabledboolean—
type"image/png" | "image/jpeg" | "image/webp""image/png"export format
modelValuestring""data URL of the drawing; empty when blank

Events

NamePayloadDescription
update:modelValue[value: string]
end[dataUrl: string]

Slots

NameScopeDescription
actions{ clear: () => void; empty: boolean; }

Exposed

NameTypeDescription
clear() => void
isEmpty() => boolean

Released under the MIT License. Character names and artwork belong to their owners.