Shadix UIShadix UI
Shadix UISignature Pad

Signature Pad

Previous

A customizable signature pad component for shadcn/ui. Allows users to draw signatures on a canvas, with options to clear, undo, and export.

Installation

GitHub
pnpm add shadcn@latest add @shadix-ui/signature-pad

Usage

Basic Usage

Import the component

import { SignaturePad } from '@/registry/new-york/components/signature-pad';

Import the styles

@import '@styles/signature-pad.css' // or relative path to the styles file based on your components.json file;;

Or add this to your tailwind.config.ts:

theme: {
    extend: {
        cursor: {
            pencil: 'url("data:image/svg+xml...") 0 24, pointer'; // copy the value from the styles file
        }
    }
}

Use the component

<SignaturePad
    penColor="hsl(var(--foreground))"
    lineWidth={4}
    showButtons={true}
    saveButtonIcon={<Save />}
    clearButtonIcon={<BrushCleaning />}
/>

Props

Prop

Type

Built by Gihan (apix-js) for Shadcn at Vercel. Source code on GitHub.