Customize
Accent
3.0
0.30
Installation
Installs are paused for now. You can still preview and customize every component on its page.
Usage
import { SignPad } from "@/components/sign-pad";
<SignPad />Save the signature
import { useState } from "react";
import { SignPad, type SignPadValue } from "@/components/sign-pad";
export function Example() {
const [signature, setSignature] = useState<SignPadValue | null>(null);
return <SignPad onChange={setSignature} />;
}The value includes the signature as an image, an SVG and the raw strokes.
Start with a signature
<SignPad defaultValue={signature} />The ink is dark in light mode and light in dark mode.
Props
PropType
Called when the saved signature changes.
Called when a signature is finished.
Called when signing is closed without finishing.
Starts with an existing signature.
Default
nullColor of the Done button.
Default
"var(--brand)"Pen width in pixels.
Default
3How much drawing is needed before you can finish.
Default
0.3Replaces the built in button and hint text.