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
Counts the same as a signature
v-modelis a data URL of the drawing (typesets PNG, JPEG or WebP), empty while blank.@endfires 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
coloris set.hintandclearLabelset the copy.
Usage
ts
import { BlessSignaturePad } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
height | number | 160 | |
lineWidth | number | 2 | |
color | string | — | |
label | string | "Signature" | |
clearLabel | string | "Clear" | |
hint | string | "Sign above" | shown under an empty pad |
disabled | boolean | — | |
type | "image/png" | "image/jpeg" | "image/webp" | "image/png" | export format |
modelValue | string | "" | data URL of the drawing; empty when blank |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string] | |
end | [dataUrl: string] |
Slots
| Name | Scope | Description |
|---|---|---|
actions | { clear: () => void; empty: boolean; } |
Exposed
| Name | Type | Description |
|---|---|---|
clear | () => void | |
isEmpty | () => boolean |