SignaturePad
v1.0.8NewUpdated 27 Aug 2026Dependency-free canvas signature capture with smooth quadratic-curve strokes and velocity-based pen width. DPR-aware and responsive (ResizeObserver redraw), undo/clear toolbar, read-only display from a data URL, and PNG
Preview
Live · 11 stories▸Why this is recommendedformsignaturecanvasdraw+5
The default, out-of-the-box SignaturePad.
- ✓Delivery / goods-received sign-off
- ✓Quotation and contract acceptance
- ✓Consent forms
- ✓POS acknowledgements
- Mouse / touch / pen via pointer events (coalesced events supported)
- Smooth quadratic-curve strokes with velocity-based width
- devicePixelRatio-aware sizing + ResizeObserver redraw
- Undo stroke / clear with built-in toolbar (localisable labels)
- Controlled (value/onChange) and uncontrolled (defaultValue) modes
- Read-only display mode from an initial data URL
- toDataURL(type, quality) + toSVG() via ref handle, onEnd(dataUrl) callback
- Pen colour from currentColor token (dark-mode safe)
- Keyboard: Backspace undoes last stroke, Escape cancels stroke in progress
- Hidden form input via name, sizes sm / md / lg
- ✕Free-form sketching or image annotation (use a drawing tool)
- ✕Typed name confirmation (use Input)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
valueControlled signature data URL
—defaultValueUncontrolled initial data URL
—onChangeFires on stroke end / undo / clear (null when empty)
—onEndFires when a stroke finishes
—sizeCanvas height preset
—strokeWidthBase pen width; actual width varies with velocity
—readOnlyDisplay-only render of the value
—disabledDisable drawing and toolbar
—refclear / undo / isEmpty / toDataURL / toSVG / focus
—