Signature Pad
betaA pad to sign with a pointer, finger or pen — ink that thins with speed, undo and clear, and a typed alternative.
- Forms
- 1 file
- 1 npm package
- Accessibility notes
- Draws on a canvas
pnpm dlx @dowel-ui/cli add signature-padnpm packages installed: class-variance-authority.
import { SignaturePad } from "@/components/ui/signature-pad";Default
With Preview Image
Initials
Disabled
<SignaturePad>
| Prop | Type | Default |
|---|---|---|
allowTypedOffer "Type instead", a keyboard way to sign. On by default. | boolean | true |
defaultValueA signature to start from, as an image URL. | string | null | null |
disabled | boolean | false |
labelThe pad's accessible name and visible caption. | string | "Signature" |
maxWidthThickest stroke, in px, reached when the pen is slow. | number | 3.2 |
minWidthThinnest stroke, in px, reached at speed. | number | 0.8 |
nameSubmits the data URL under this name in a surrounding form. | string | — |
onChangeCalled after each stroke, undo, clear or typed change with a PNG data URL, or | (dataUrl: string | null) => void | — |
placeholderHint drawn on the empty pad. | string | "Sign here" |
size | "sm" | "md" | "lg" | "md" |
valueControlled signature, as an image URL (a PNG data URL); | string | null | — |
Plus every attribute of <div> except onChange, defaultValue.
7/7
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes