HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Signature

PreviousNext

Capture a signature by drawing it or typing a name in a handwriting font. Exports a trimmed PNG, and an SVG for drawings.

Base UIReact AriaRadix UI
Radix UI

Draw your signature with a mouse, pen or finger. Keyboard users can switch to Type mode.

Sign here

Nothing signed yet

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/signature.json

Usage#

import { Signature, type SignatureValue } from "@/components/ui/signature"
const [signature, setSignature] = React.useState<SignatureValue | null>(null)
 
<Signature aria-label="Your signature" value={signature} onValueChange={setSignature} />

The value is null when the pad is empty. Otherwise it holds mode, dataUrl (a trimmed PNG), svg for drawings, text and font for typed names, and color.

Draw and type#

Draw takes a mouse, a pen or a finger. A pen's pressure sets the stroke width, and mouse and touch get a natural taper. Strokes are kept as points, so the drawing stays sharp when the pad resizes. Undo removes the last stroke.

Type is the keyboard path. The fonts load from Google Fonts the first time Type opens, and a system script face shows until they arrive. Pass fonts to use your own, each with a family, a label and an optional stylesheet href.

Export#

Pass a ref to get helpers.

const ref = React.useRef<SignatureHandle>(null)
 
<Signature ref={ref} />
 
const png = await ref.current?.toPNG({ scale: 3, background: "#fff" })
const svg = ref.current?.toSVG()

The ref also has clear, undo, isEmpty and getValue.

In a form#

Give it a name and a hidden input carries the PNG data URL. Add required for native validation, or set aria-invalid and show a FieldError.

Service agreement
Website retainer for Fraser Valley Dental, $1,850 CAD a month.

Type your full name and pick a style.

Your signature shows here

Draw it, or type your name and pick a style.

Oct 12, 2026

A drawn or typed image is not a legally binding e-signature process by itself. Record consent, identity and a timestamp on your server too.

Disabled#

Draw your signature with a mouse, pen or finger. Keyboard users can switch to Type mode.

Sign here

Props#

  • value, defaultValue, onValueChange. Controlled or uncontrolled. Setting the value to null clears the pad. A value with strokes and box restores a drawing.
  • mode, defaultMode, onModeChange. "draw" or "type". modes limits the choice, and one mode hides the switch.
  • penColor, defaultPenColor, colors. "auto" follows the text color on screen and exports as near black. Pass colors={[]} to hide the color choice.
  • penWidth. Stroke size in pixels. Defaults to 3.5.
  • height. Pad height in pixels. Defaults to 176.
  • background. Fills the exported PNG. Transparent by default.
  • name, required, disabled, aria-invalid. Form behavior and states.
  • fonts, placeholder. The Type mode fonts and the name input placeholder.

Clear and undo fade the strokes down and out on the motion scale, and play a sound when sounds are on. Screen readers hear when the pad is cleared or a stroke is undone.

SidebarSkeleton

On This Page

InstallationUsageDraw and typeExportIn a formDisabledProps