Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Inputs

Signature Pad

Inputs

Signature Pad React component for Tailwind CSS v4

SelectSlider
Live props
State
defaultMode
required
invalid
disabled
readOnly
Content
label
description
error
placeholder
Appearance
variant
size
radius
penColor
exportColor
minWidth0.8px
maxWidth2.8px
velocityFilterWeight0.7
guide
Layout
height200px
Behavior
showToolbar
trimExport
fileName
name
Code
import { SignaturePad } from "@/components/ui/signature-pad"

<SignaturePad />
  1. Home
  2. Components
  3. Inputs
  4. Signature Pad
Pro

Signature Pad React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

A React signature pad: draw with a finger, pen or mouse in ink that thins with speed, or type a name, then export it as PNG or SVG.

Draw on the dashed area with a finger, a stylus or the mouse: the ink follows the pointer at full frame rate, gets thinner when you move fast and thicker when you slow down, and a tap leaves a dot. The page still scrolls when you swipe outside the area. The placeholder fades away with the first stroke and a small frosted toolbar fades in at the top corner with Undo (removes the last stroke) and Clear (removes everything); on touch screens each is a 44px target and long press shows its name. Tab reaches the Draw / Type switch first (arrows move between the two), then the drawing area: there mod+z undoes the last stroke and Delete or Backspace clears it, and a screen reader hears Signature added and Signature cleared. Type switches to a name field: the name appears on the baseline in a handwriting font and shrinks to fit when it is long. The ink is the text color on screen (white in dark mode) and repaints when the theme changes; exports are always dark ink on a transparent background, cropped to the signature. Rotating a phone keeps the signature, scaled to fit the new size. Read-only shows the saved signature as an image without the toolbar.

Signature Pad is a Pro React component in the React input components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add signature-pad, together with Field, Button, Segmented Control, Input, Tooltip and 4 more and the npm packages signature_pad, motion and lucide-react.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add signature-pad

Signature Pad is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import SignaturePad from @/components/ui/signature-pad.

import { useState } from "react"
import { Button } from "@/components/ui/button"
import { SignaturePad, isSignatureEmpty, type SignatureData, type SignaturePadApi } from "@/components/ui/signature-pad"

export function ConfirmDelivery() {
  const [signature, setSignature] = useState<SignatureData | null>(null)
  const [api, setApi] = useState<SignaturePadApi | null>(null)

  const confirm = async () => {
    const png = await api?.toBlob()
    if (png) console.log("Signature", png.size, "bytes")
  }

  return (
    <div className="flex max-w-md flex-col gap-4">
      <SignaturePad
        label="Recipient signature"
        description="Sign with your finger or mouse"
        required
        value={signature}
        onValueChange={setSignature}
        setApi={setApi}
        placeholder="Sign here"
        fileName="Recipient signature"
      />
      <Button size="lg" disabled={isSignatureEmpty(signature)} onClick={confirm}>
        Confirm delivery
      </Button>
    </div>
  )
}

Props

  • value
    SignatureData | null ({ kind: "drawn"; strokes: SignatureStroke[]; width: number; height: number } | { kind: "typed"; text: string; font: string })

    The controlled signature; null when empty. Drawn strokes are in css px of a width x height box and are scaled by width when shown at another size, so a signature saved on a phone fits a desktop pad.

  • defaultValuedefault "null"
    SignatureData | null

    The uncontrolled start, for example a saved signature. A form reset puts it back.

  • onValueChange
    (value: SignatureData | null) => void

    Fires when a stroke ends (never per point), after undo and clear, when the mode switches and as you type.

  • onEnd
    () => void

    A stroke finished.

  • modesdefault "["draw", "type"]"
    SignatureMode[] ("draw" | "type")

    The ways to sign. With one entry the Draw / Type switch is hidden. Type is the keyboard and screen reader path, so keep it unless another one exists.

  • mode
    "draw" | "type"

    The controlled mode. A typed value from outside switches to type, a drawn one to draw.

  • onModeChange
    (mode: SignatureMode) => void

    The person switched between Draw and Type.

  • defaultModedefault "draw"
    "draw" | "type"

    The uncontrolled starting mode. Each mode keeps its own draft, so switching back restores the strokes or the name.

  • labeldefault ""
    ReactNode

    The field label. It names the drawing area (aria-labelledby) and becomes the name field's label in type mode; a click on it focuses the pad.

  • descriptiondefault ""
    ReactNode

    Helper text under the pad, linked with aria-describedby. The error takes its place while it shows.

  • errordefault ""
    ReactNode

    Replaces the description with the animated error, rings the surface red and sets aria-invalid.

  • placeholderdefault "Sign here"
    string

    Centered in the empty surface above the baseline; fades out with the first stroke. Empty shows nothing.

  • variantdefault "outline"
    "soft" | "outline"

    outline is a dashed 2px zone (a signing area reads as a place to act), soft is the filled field look for forms full of soft inputs.

  • sizedefault "md"
    "sm" | "md" | "lg"

    The label, the typed name field (32 / 40 / 48px) and the switch and toolbar buttons (lg gets 40px buttons).

  • radiusdefault "md"
    "none" | "sm" | "md" | "lg" | "full"

    The surface corners: none, 12px, 16px (md), 24px; full falls back to 24px. The name field takes the same radius.

  • heightdefault 200
    number

    Surface height in px; the width is the container's. 200 fits a phone, 240 is roomy for couriers.

  • penColordefault "currentColor"
    string

    The ink on screen. currentColor reads the surface's text color (the foreground token, so white ink in dark mode) and repaints on theme changes; set classNames.surface to a text color class for a themed ink. Strokes drawn with a custom color keep it.

  • exportColordefault "#111111"
    string

    The ink in every export, whatever the theme: dark ink on a transparent background reads on any document. #1F3A93 is a classic blue pen.

  • minWidthdefault 0.8
    number

    The thinnest stroke in px, reached on fast movements (signature_pad).

  • maxWidthdefault 2.8
    number

    The thickest stroke in px, reached on slow movements and dots.

  • velocityFilterWeightdefault 0.7
    number

    How much the previous speed smooths the next width, 0 to 1 (signature_pad). Higher is calmer ink.

  • guidedefault true
    boolean

    A dashed baseline at 72% of the height with a × at its start, where people expect to sign.

  • typedFontdefault ""Segoe Script", "Snell Roundhand", "Brush Script MT", "Apple Chancery", cursive"
    string

    The typed signature's font stack. System fonts only, nothing downloads; exports use the same stack. Exported as DEFAULT_SIGNATURE_FONT for rendering a typed signature elsewhere (a PDF, an email).

  • showToolbardefault true
    boolean

    Undo and Clear at the top corner of the drawing area, shown once there is ink (type mode clears from the name field). Off when your own buttons do it through the api.

  • trimExportdefault true
    boolean

    Exports crop to the signature's bounds plus 12px of padding. Off keeps the full pad box, the signature where it was drawn.

  • fileNamedefault "signature"
    string

    The base name for api.download(), with the local date and time appended ("Signature-2026-09-24-1640.png").

  • setApi
    (api: SignaturePadApi) => void

    Called after mount and whenever the export settings change. SignaturePadApi: clear(), undo(), isEmpty(), getValue(), toBlob({ type, quality, trim, padding = 12, scale = 2, background, color }), toSVG({ trim, padding, background, color }), toDataURL(type = "image/png" | "image/svg+xml"), download({ format = "png" | "svg", ...toBlob options }) resolving with the file name.

  • requireddefault false
    boolean

    The red mark after the label and aria-required. The check itself belongs to your form: isSignatureEmpty(value), exported by the file, is true for null, no strokes or a blank typed name.

  • invaliddefault false
    boolean

    The invalid look (a red ring and a red dashed border) and aria-invalid without a message.

  • disableddefault false
    boolean

    Dims to 50%, the pen stops listening, no toolbar, the switch and the name field are disabled.

  • readOnlydefault false
    boolean

    Shows the signature as an image (role="img", named by the label and, for a typed one, the name) without the switch, the name field or the toolbar.

  • namedefault ""
    string

    Form field name: a hidden input carries the signature as a PNG data url (export color, trimmed), updated after each stroke. A form reset puts defaultValue back.

  • id
    string

    The drawing area's id (the name field's in type mode). Defaults to useId(); the label points at it.

  • fieldProps
    Partial<FieldProps>

    Anything else for the Field wrapper: optional, labelAction, orientation, labelWidth, hideLabel.

  • labels
    Partial<SignaturePadLabels>

    Every visible and announced string: draw, type, modes, typePlaceholder, undo, clear, canvas, canvasHint, signature, added, undone, cleared, empty, downloaded(fileName). English defaults in DEFAULT_SIGNATURE_PAD_LABELS.

  • classNames
    Partial<Record<"root" | "modes" | "surface" | "canvas" | "typed" | "input" | "preview" | "guide" | "placeholder" | "toolbar" | "button" | "field" | "label" | "description" | "error" | "counter", string>>

    Extra classes for the inner parts. A text color on surface is the on-screen ink when penColor is currentColor.

Parts

  • isSignatureEmpty

    function

    isSignatureEmpty(value): true for null, a drawn value with no strokes or a typed value with a blank name. Use it to gate a submit button or a required check.

  • DEFAULT_SIGNATURE_PAD_LABELS

    constant

    The English strings for the switch, toolbar, placeholders and screen reader announcements. Spread it and override a few keys through labels.

  • DEFAULT_SIGNATURE_FONT

    constant

    The system script font stack typed signatures use by default. Reuse it to render a typed signature in a PDF or an email.

  • SignatureData

    type

    The saved value: { kind: "drawn", strokes, width, height } or { kind: "typed", text, font }. Store it as JSON to show the signature again later.

  • SignaturePadApi

    type

    What setApi hands you: clear, undo, isEmpty, getValue, toBlob, toSVG, toDataURL and download.

  • SignaturePadProps

    type

    The props of SignaturePad, for wrappers that pass them through.

Examples

Typed signature

Type mode with a script font, exported as a PNG.

Courier delivery

A phone-sized screen: a taller pad and a confirm button that waits for ink.

Blue ink

exportColor #1F3A93 with a wider pen; on screen the ink follows a themed text color.

Read-only

A saved signature with the signing date, shown as an image.

Validation

Required: sending without a signature shows the error.

Soft, in a form

variant soft next to soft inputs.

Dependencies

signature_padmotionlucide-reactfieldbuttonsegmented-controlinputtooltipfile-exportuse-controllable-statemotionui-config

Files

  • components/ui/signature-pad.tsx

FAQ

Is the React Signature Pad component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Signature Pad?

Run npx wingo-ui@latest add signature-pad. It also adds the Wingo UI items it builds on (Field, Button, Segmented Control, Input, Tooltip and 4 more) and the npm packages signature_pad, motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/signature-pad.

See also

File exportlibFile UploadImage CropperQR CodeForm Wizard

More React input components

Tag InputTextareaTime PickerTimezone SelectTree SelectDuration Picker
All 40 React input components

Articles using this component

  • React Signature Pad: Smooth Ink, Typed Mode, PNG and SVG

    Component guides · Oct 16, 2026 · 9 min read

PreviousSelectNext Slider

Report no. 2026-0412

Equipment handover report

Northwind Labs → Summit Logistics

Sep 24, 2026

3 × Laptop Dell Latitude 5450 · serials 7XK2P, 7XK2Q, 7XK2R · good condition

Handed over by: Emma Carter
×
Draw with a finger, pen or mouse. Switch to Type to use the keyboard.

Northwind Labs, Administrator

Recipient signature
×
Sign here
Draw with a finger, pen or mouse. Switch to Type to use the keyboard.

Sign with your finger or mouse

isEmpty() true · strokes 0 · signature

On the document (export)

Sender: Emma Carter
Recipient: Summit Logistics