Skip to main content

Signature

Container Properties

The first layer of all component configurations supports Container Properties.

Component Properties (componentsProps)

NameTypeDefault是否支持 Variable PatternDescription
classNamestring✔️The className of the component.
styleobjectThe style of the component.
penColorstring'black'Pen stroke color.
minWidthnumber0.5Minimum width of the pen stroke.
maxWidthnumber2.5Maximum width of the pen stroke.
backgroundColorstring'rgba(0,0,0,0)'Canvas background color.
outputType'image/png' | 'image/jpeg' | 'image/svg+xml''image/png'Output image format of the signature.
canvasWidthnumberCanvas width. Defaults to the container width if not specified.
canvasHeightnumber200Canvas height.
hideToolbarboolfalseWhether to hide the bottom toolbar (hint text and clear button).

All other componentsProps will be passed to the canvas wrapper element (div).

JS API

The interface obtained through formApi.getFieldApi() is as follows. The signaturePad property is the underlying signature_pad instance — refer to its official API documentation for more advanced operations.

NameTypeDescription
nodeHTML ElementThe root DOM element of the component.
signaturePadSignaturePadThe underlying SignaturePad instance.
clear() => voidClear the signature on the canvas.