Signature allows users to provide a handwritten, typed, or uploaded signature with RTL support.
Loading demo: signature-real-world
npx sdaia-ui@latest add signature
import { Signature } from '@/components/ui/Signature';<Signature type="draw" />Freehand drawn signature using mouse or touch input.
Loading demo: signature-draw
Signature generated from typed text.
Loading demo: signature-text
Signature uploaded as an image file.
Loading demo: signature-upload
Props for the Signature component.
Prop | Type | Default | Required |
|---|---|---|---|
type | 'draw' | 'text' | 'upload' | - | optional |
defaultType | 'draw' | 'text' | 'upload' | 'draw' | optional |
onTypeChange | (type: SignatureType) => void | - | optional |
helperText | string | — | optional |
showHelperText | boolean | true | optional |
showOptions | boolean | true | optional |
showTabs | boolean | true | optional |
cancelLabel | string | 'Cancel' | optional |
acceptLabel | string | 'Accept and Sign' | optional |
onCancel | () => void | - | optional |
onAccept | (data?: string | File) => void | - | optional |
className | string | - | optional |
labels | Partial<SignatureLabels> | English strings | optional |
dir | "ltr" | "rtl" | — | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Full width of its container, at least 450px high. Large tabs. |
| Tablet (768–1279px) | Medium tabs from 768px, switched automatically. |
| Phone (under 768px) | Small tabs below 768px. The tool row wraps and the drawing area shrinks with the screen. |