Skip to content
caliper ui pro docs

Smart form fill

Fill a form from pasted text such as an email signature, an invoice or a note. The fields found fill in with a mark, the ones the AI was unsure of ask to be checked, fields already typed are kept, and the whole fill can be undone.

Pro

New contact

Paste their signature and the fields fill in.

When to use

  • Contact, lead, vendor and expense forms that are usually copied from an email or document.
  • Long forms where most values already exist somewhere as text.

When not to use

  • Passwords, payment details or anything that must be typed by the person.
  • Forms of one or two fields; the paste step costs more than typing.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/smart-form-fill

Adds its 9 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

SmartFormFill

9 props
PropTypeDefaultDescription
fields *readonly FillField[]—
values *Record<string, string>—
onValuesChange *(values: Record<string, string>) => void—
onExtract *(text: string, signal: AbortSignal) => Promise<FillResult>—Reads the text. Abort when the signal fires (Stop); throw to show an error.
sourceLabelstring"Fill from text"
defaultTextstring""Text to start with, such as the email the form was opened from.
sourcePlaceholderstring"Paste an email, signature or note"
thresholdnumber0.7Confidence under which a filled field asks to be checked.
classNamestring—

Keyboard

Enter
Activates the focused control.

Accessibility

It exposes status semantics, with aria-hidden and aria-keyshortcuts kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/smart-form-fill.md

The index of every part is at /llms.txt.

More in Assistant screens