Signature Input captures a handwritten signature using a responsive canvas and stores the result as a data URL string.

Preview

Props

PropTypeDefaultDescription
valuestring""Data URL string of the signature image.
onChange(value: string) => void-Called with the PNG data URL when drawing ends.
disabledbooleanfalseDisables drawing and the clear action.
heightnumber160Canvas height in pixels.
penColorstring"#0f172a"Stroke color used for drawing.
backgroundColorstring"#ffffff"Canvas background fill color.
strokeWidthnumber2Stroke width used for drawing.
classNamestring-Optional wrapper class name.

Installation

1

Install dependencies

Install the required packages for the component.

Terminal
Loading code…
2

Copy the component

Copy and paste the component code into your project.

Component
Loading code…
3

Update imports

Import and use the component in your project.

Usage
Loading code…

Preview