Description
react-signature-canvas is a React wrapper component around the signature_pad library, for capturing handwritten signatures on a canvas. It is a fork of react-signature-pad that does not add any styling or extra elements, so it wraps a single canvas element. The fork has since grown: it wraps the upstream signature_pad so that its updates and bug fixes come through, it passes props directly to the underlying canvas, it has documented API methods and props, a live demo and a CodeSandbox playground, 100% test coverage, and TypeScript types. The pen is controlled by props for velocity filter weight, minimum and maximum width, minimum distance, dot size, pen colour and throttle, all of which are optional with defaults. Callbacks run when a stroke begins and ends. The API methods include isEmpty, clear, toDataURL, fromDataURL, and fromData, which can save and restore a signature as an image or as point data. It suits React developers who need a signature field in a form or an app.…
Highlights
- Canvas wrapper with no extra markup
- Optional pen props and stroke callbacks
- Save and restore signatures as data URLs
- TypeScript types and 100% test coverage
Ratings & Reviews
No ratings yet
Be the first to rate react-signature-canvas.
People also visit

react-sketch-canvas
Freehand vector drawing component for React using SVG as canvas
react-signature-canvas FAQ
What does react-signature-canvas do?
It gives a React app a canvas for drawing a signature, wrapping the signature_pad library.
Does it add any styling?
No. The README says it is unopinionated and wraps just a single canvas element.
How do I save a signature?
The toDataURL method returns the signature as a base64 image, and fromDataURL can draw one back onto the canvas.
Can I change the pen?
Yes. The props control velocity filter weight, minimum and maximum width, pen colour and other stroke settings.
Is it typed?
Yes. The README says it is written in TypeScript and includes types.
What are the best react-signature-canvas alternatives?
Popular alternatives to react-signature-canvas include react-sketch-canvas, react-native-signature-capture and react-canvas-draw. See all react-signature-canvas alternatives

















