Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Signature

Capture a signature for a contract workflow.

Preview

Live preview

Changes apply to this preview only.

Authorised signature

Draw your signature with a mouse, pen or touch. The Clear button starts over and Delete clears from the keyboard.

Draw your signature with a mouse, pen or touch. Press Delete to clear and Control Z to undo.

Not signed yet

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Basic

Draw inside the dashed area. The clear and undo actions live under the pad, and the canvas itself is focusable for keyboard clearing.

Open preview

States

Read-only displays an existing signature without accepting input. Disabled blocks drawing and dims the pad.

Open preview

Examples

Two real documents that need a handwritten mark.

Open preview

Usage

A canvas result is image data; legal consent, identity verification and storage belong to the application.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluSignatureProps

Type source
PimoluSignatureProps public API
NameTypeDefaultDescription
idstring | undefined—Public Pimolu prop; see the source declaration for details.
valuestring | null | undefined—Controlled signature as a PNG data URL, or `null` when empty.
defaultValuestring | null | undefined—Initial signature when uncontrolled.
onChange((dataUrl: string | null) => void) | undefined—Called after each stroke and on clear/undo with the latest data URL, or `null` when the pad is empty or a canvas export is unavailable.
widthnumber | undefined600Drawing area width in CSS pixels. Defaults to 600.
heightnumber | undefined200Drawing area height in CSS pixels. Defaults to 200.
penColorstring | undefined#111827CSS colour used for new strokes. Defaults to #111827.
backgroundColorstring | undefined#ffffffCSS colour of the pad. Defaults to #ffffff.
lineWidthnumber | undefined2Stroke thickness in CSS pixels. Defaults to 2.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
readOnlyboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
labelstring | undefined—Visible label associated with the control.
descriptionstring | undefined—Public Pimolu prop; see the source declaration for details.
clearLabelstring | undefined"Clear signature"Visible clear button label. Defaults to "Clear signature".
undoboolean | undefinedfalseShow an undo button that removes the last stroke.
onEnd((dataUrl: string | null) => void) | undefined—Called at the end of each stroke with the exported data URL.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
styleCSSProperties | undefined—Public Pimolu prop; see the source declaration for details.
aria-labelstring | undefined—Public Pimolu prop; see the source declaration for details.
id

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

value

string | null | undefined

No default extracted.

Controlled signature as a PNG data URL, or `null` when empty.

defaultValue

string | null | undefined

No default extracted.

Initial signature when uncontrolled.

onChange

((dataUrl: string | null) => void) | undefined

No default extracted.

Called after each stroke and on clear/undo with the latest data URL, or `null` when the pad is empty or a canvas export is unavailable.

width

number | undefined

Default: 600

Drawing area width in CSS pixels. Defaults to 600.

height

number | undefined

Default: 200

Drawing area height in CSS pixels. Defaults to 200.

penColor

string | undefined

Default: #111827

CSS colour used for new strokes. Defaults to #111827.

backgroundColor

string | undefined

Default: #ffffff

CSS colour of the pad. Defaults to #ffffff.

lineWidth

number | undefined

Default: 2

Stroke thickness in CSS pixels. Defaults to 2.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

readOnly

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

label

string | undefined

No default extracted.

Visible label associated with the control.

description

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

clearLabel

string | undefined

Default: "Clear signature"

Visible clear button label. Defaults to "Clear signature".

undo

boolean | undefined

Default: false

Show an undo button that removes the last stroke.

onEnd

((dataUrl: string | null) => void) | undefined

No default extracted.

Called at the end of each stroke with the exported data URL.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

style

CSSProperties | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-label

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Provide clear/reset controls and an alternative signing workflow for users who cannot draw.
Read the accessibility guide →