Components

The signing experience, in pieces

Every part of the page a signer sees, shown in each state. They live in src/components/signing, are open source with the rest of TypeSign, and are what the signer page is built from (the free signer shares the PDF signature block). Signing surfaces are always light: people sign on paper-like pages.

The playground runs the whole signing flow on a mock PDF. Nothing is sent or stored.

Theme

One accent colour drives every brand shade on the signing surface: buttons, tints, focus rings and field outlines. TypeSign blue is the default. Pick a preset or your own colour; the whole page follows. In code: wrap the surface in accentProps("forest") or accentProps("#0f766e"), or set data-signing-accent="custom" and --signing-accent in CSS.

Applies to every example on this page
Props: ThemePicker, accentProps

ThemePicker

PropTypeDefaultWhat it does
valueSigningAccentA preset id or a #rrggbb colour.
onChange(a: SigningAccent) => voidCalled with the new accent.
compactbooleanfalseSmaller swatches for toolbars.

accentProps

PropTypeDefaultWhat it does
accentstring | nullTypeSign blueSpread the result on the element that wraps a signing surface.

Signature block in the PDF

What a signature looks like on paper. The top line says what was checked, never a brand claim: 'Email verified with a one-time code' for envelopes, 'Self-declared: identity not checked' in the free signer, red TEST or MOCK for test output (ADR 0015). The typed signature uses the same font as on screen, embedded in the PDF. Drawn by the same code on the server and in the free signer.

Loading document…
Rendered from a real PDF stamped in your browser · tall field
Props: drawSignatureBlock

drawSignatureBlock

PropTypeDefaultWhat it does
signaturetyped | drawnThe typed text with its font, or the drawn image.
assurancestringFirst line: what was checked. Never a brand claim.
warningbooleanfalseRed bracket and text for test or mock output.
titlestringThe signer's name under the line.
detailstringTime and evidence id, or the fingerprint note.

Document fields

Fields sit on the rendered page. Dashed means it is waiting for you, a solid outline with a tag is the next thing to do, a check means done, grey is filled in for you. Initials are a design preview: the API has no initials field yet (proposal in ADR 0019).

Click to sign
Initial
Job title
2026-12-04
Todo: waiting for you
Add signature Click to sign
Initial
Job title
2026-12-04
Active: the next thing to do
Ada Example
AE
CTO
2026-12-04
Done
Click to sign
Initial
Job title
2026-12-04
Locked: filled in for you, or someone else's
Props: FieldBox, PlacedField

FieldBox

PropTypeDefaultWhat it does
kind"signature" | "initials" | "text" | "date" | "checkbox"What the field holds.
state"todo" | "active" | "done" | "locked"Waiting, next to do, done, or filled in for you.
box{ x, y, width, height }Position on the page, each 0 to 1.
labelstring | nullThe sender's label, used in the tag and for screen readers.
requiredbooleanfalseRequired, as data-required. Say it in the control's label too.
quietTagbooleanfalseOutlined tag, when a bottom bar is the primary action.
tag"above" | "side" | "below""above"Where the active tag sits; beside or below when another field is just above.
onActivate() => voidCalled when the box itself is clicked or tapped.
idstringTarget id for the navigator and scrollToField.

PlacedField

PropTypeDefaultWhat it does
boxBoxPosition and size on the page, each 0 to 1.
onChange(b: Box) => voidCalled while it is dragged, resized or moved with keys.
onRemove() => voidThe × button and Delete.
labelstringWhat the field is, for screen readers.
selectedbooleanfalseShow the handles without focus, e.g. right after placing.
onSelect() => voidCalled when the field gets focus.
minWidthnumber0.06Smallest width, as a share of the page.
minHeightnumber0.02Smallest height, as a share of the page.
idstringSet as data-field-id, to focus a field just placed.

Signature capture

Type or draw. The typed name is shown in a script face on a signing line, so it looks like what lands in the document.

Your signature

Style

Live: type or draw
Empty
What the document field shows
Props: SignatureCapture, SignaturePreview, SignatureLine, SignatureFontPicker, SignaturePad

SignatureCapture

PropTypeDefaultWhat it does
defaultNamestringPrefills the typed name.
defaultValueCapturedSignature | nullRead on mount: the last value onChange reported, so a remount keeps what the person chose. Change key to reset.
onChange(s: CapturedSignature | null) => voidTyped text with font, or a drawn PNG.
titlestring"Your signature"Heading. Empty when a container (a sheet) has its own.
padHeightnumber180Height of the drawing pad in CSS pixels.
headingLevel2 | 32Heading level in the page outline.

SignaturePreview

PropTypeDefaultWhat it does
signatureCapturedSignatureWhat to show.
onLinebooleanfalseInside SignatureLine: a drawing sits on the line exactly as drawn.
padHeightnumber180With onLine: the pad it was drawn on, so it shows 1:1.

SignatureLine

PropTypeDefaultWhat it does
heightnumber120Height in CSS pixels.
belownumber24Space under the line. signatureLineFor(padHeight) gives a pad's geometry.

SignatureFontPicker

PropTypeDefaultWhat it does
textstringThe name to show in each face.
valueSignatureFontIdThe chosen face.
onChange(id: SignatureFontId) => voidArrow keys move between faces.
labelledBystringId of a visible label; otherwise named "Signature font".

SignaturePad

PropTypeDefaultWhat it does
onChange(png: string | null) => voidBase64 PNG, cropped to the ink at full height.
heightnumber180Height in CSS pixels. The line sits at 74%.
lineWidthnumber2.5Stroke width.

Sheet

One task at a time on a phone: it rises from the bottom within thumb reach, and is a centred dialog on wider screens. Focus stays inside, Escape and a tap outside close it, and the actions stay visible while the content scrolls.

Review and sign

Mutual NDA — Example Labs

The signing page uses this for the signature on phones, and for the final review: the statement to agree to and the Sign button.

Open it, then try Escape or a tap outside
Props: Sheet

Sheet

PropTypeDefaultWhat it does
openbooleanShown as a modal dialog while true.
onClose() => voidEscape, the × button and a tap outside.
titleReactNodeHeading; also the dialog's name.
descriptionReactNodeOne line under the title.
footerReactNodeActions, kept visible while the content scrolls.

One-time code

Six boxes over one real input, so paste, autofill from the email and screen readers work. It submits by itself when the sixth digit arrives.

Live

The code is wrong or has expired.

Wrong code
Props: OtpInput

OtpInput

PropTypeDefaultWhat it does
valuestringThe digits so far.
onChange(v: string) => voidDigits only.
onComplete(v: string) => voidCalled when the last digit arrives.
busybooleanfalseChecking: read-only but still focusable and readable.
invalidbooleanfalseRed boxes; pair with describedBy.
lengthnumber6Number of digits.
idstringRequired: the id of the real input, for its label.
describedBystringId of the error or hint text.
disabledbooleanfalseNot usable at all. Prefer busy while checking.

Steps and progress

Steps tell where the person is in the flow. The checklist tells what is left before they can finish, with a bar that turns green when they can.

  1. 1Confirm it's you
  2. 2Review and fill in
  3. 3Sign
  1. Confirm it's you (done)
  2. 2Review and fill in
  3. 3Sign
  1. Confirm it's you (done)
  2. Review and fill in (done)
  3. 3Sign
Steps, each state
  • Required fields filled in (done)
  • Add your signature
  • Confirm you agree
Checklist, part done
  • Required fields filled in (done)
  • Add your signature (done)
  • Confirm you agree (done)
Checklist, ready
Props: Steps, ProgressBar, Checklist

Steps

PropTypeDefaultWhat it does
stepsstring[]Three or four short step names.
currentnumberIndex of the current step; earlier ones show a check.
labelstring"Progress"Name of the list for screen readers.

ProgressBar

PropTypeDefaultWhat it does
valuenumberDone so far.
maxnumberTotal.
labelstringWhat it measures, for screen readers.
donebooleanfalseTurns green when the person can finish.

Checklist

PropTypeDefaultWhat it does
items{ ok, label, onSelect? }[]What is left. Open items with onSelect take the person there.

Callouts

Information inside a page. Tone always comes with an icon, and with a title when the message is more than one line.

Sandbox document

Signed with a test key. It shows how signing works and has no legal effect.
Info

Seal verified

The evidence matches this PDF, byte for byte.
Success

Identity not verified

The name was typed by the signer. Nobody checked it.
Warning
Danger, with action
Your file never leaves your browser.
Neutral, one line
Props: Callout

Callout

PropTypeDefaultWhat it does
tone"info" | "success" | "warning" | "danger" | "neutral""info"Always with its icon. Danger is announced.
titleReactNodeBold first line.
actionReactNodeA button or link under the text.
role"alert" | "status"Announce it. Danger is an alert by default.

People and status

Who is part of the envelope and where each person is. The current person is blue; status is a word, never only a colour.

  • Ada Example (you)Signed
  • Bo SampleInvited
  • Cy DemoWaiting for their turn
  • Dee TestDeclined
Four people, one in each status
Props: PersonList, Avatar, StatusPill

PersonList

PropTypeDefaultWhat it does
people{ name, you?, status, label }[]Status is a word in a pill, never only a colour.

Avatar

PropTypeDefaultWhat it does
namestringInitials are taken from it.
highlightbooleanfalseThe current person, in the accent.
size"sm" | "md""md"32 or 36 px.

StatusPill

PropTypeDefaultWhat it does
status"signed" | "declined" | "waiting" | "pending"Colour follows the word: signed green, declined red, waiting blue (their turn has not come), pending grey (invited, not acted yet).

Downloads

A file and what it is for, so a signer knows which one to keep.

Props: DownloadTile

DownloadTile

PropTypeDefaultWhat it does
hrefstringThe file.
titlestringWhat the file is.
hintstringWhat it is for.
downloadstringFile name to save as.

Outcomes

One card per screen that ends a flow: done, declined, waiting.

Thank you, you have signed

We will email you when everyone has signed. You can close this page.
Signed

It is not your turn yet

We will email you when it is your turn.
Waiting

You declined to sign

The sender has been notified.
Declined
Props: StatusCard

StatusCard

PropTypeDefaultWhat it does
titlestringThe outcome, as the page's h1.
iconReactNodeOne icon in the tone's colour.
tone"info" | "success" | "danger" | "neutral""neutral"Same names as Callout.
headingLevel1 | 2 | 311 when the card is the page's outcome.

Buttons and inputs

The primitives everything above is made of. One primary button per view.

Buttons
Text input
Props: Spinner

Spinner

PropTypeDefaultWhat it does
sizenumber16Inside a busy button, next to its label.

Helpers

The functions and hooks the kit exports.

NameSignatureWhat it does
accentProps(accent?: string | null) => propsTheme a signing surface. Light custom colours are darkened to 4.5:1.
readableAccent(hex: string) => stringThe colour, or the same hue darkened until white text on it reaches 4.5:1.
contrastOnWhite(hex: string) => numberWCAG contrast of white text on the colour.
signatureLineFor(padHeight: number) => { height, below }SignatureLine props that match a SignaturePad, so a drawing shows 1:1.
initials(name: string) => stringUp to two initials, for Avatar.
scrollToField(id: string) => voidScroll a field into view and focus its control.
useCompactLayout(query?: string) => booleanTrue below 1024 px (or for the media query given).
useTargetDirection(id: string | null) => "up" | "down" | nullWhere an element is relative to the screen; null while it is visible.