Atelier UI

Search components…

Search components…

Signature Pad

Canvas signature pad using pointer events with undo, clear, pen color/width and PNG download.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

SignaturePadProps

Also accepts all props of Omit<React.ComponentProps<"div">, "onChange">

PropTypeDefaultDescription
inksSignatureInk[]——
defaultWidthnumber——
exportBackgroundstring | null—Background painted into the exported PNG. Pass null for a transparent PNG.
filenamestring—File name used by the download button
onExport(dataUrl: string) => void—Called with the PNG data URL when the download button is pressed
onChange(isEmpty: boolean) => void—Called whenever the signature becomes empty or non-empty
hintstring——

Install

$ npx shadcn@latest add https://chromotion.dev/r/signature-pad.json

More like this