You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pre-load a saved signature via initialValue (data URL)
Disable drawing programmatically
ResizeObserver-based canvas scaling for crisp output at any DPR
Internal variables, local context, trigger events, and component actions usable in WeWeb workflows
Development
npm i # install dependencies
npm run serve --port=3100 # serve locally, then add in WeWeb editor developer popup
npm run build --name=signature-pad # check for build errors before release
Properties
Pen
Property
Type
Default
Description
Pen Color
Color
#000000
Ink color
Pen Min Width
Number
0.5
Minimum stroke width (px)
Pen Max Width
Number
2.5
Maximum stroke width (px)
Dot Size
Number
0
Single-tap dot radius. 0 = average of min/max
Velocity Filter
Number
0.7
How quickly width reacts to speed (0–1)
Throttle (ms)
Number
16
Max one point per N ms. 0 = no throttle
Min Distance (px)
Number
5
Minimum px between recorded points
Canvas
Property
Type
Default
Description
Background Color
Color
#ffffff
Canvas fill color (also baked into the export). Use rgba(0,0,0,0) for transparent PNG
Output
Property
Type
Default
Description
Output Format
Select
PNG
PNG / JPEG / SVG
JPEG Quality
Number
0.92
Compression quality (0–1). Only shown when format is JPEG
SVG Include Background
Toggle
off
Embed a background <rect> in SVG output
SVG Embed Initial Image
Toggle
off
Embed the pre-loaded image inside SVG output
Interaction
Property
Type
Default
Description
Initial Value
Text
—
Data URL to pre-load (e.g. a previously saved signature)
Disabled
Toggle
off
Prevent the user from drawing
Initial Value format
initialValue must be a data URL — raw SVG markup will not work. Examples: