Form autofillPro
Paste a signature or messy notes and the agent fills a contact form field by field, with confidence, source highlights, review and Undo.
oxyn add form-autofillThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Paste an email signature or messy notes and have the agent fill a contact (or lead, or ticket) form.
- The user wants to see where each value came from and to check only the doubtful ones.
When not to use
- A phone field with a searchable country picker, formatting as you type and E: use Phone input instead.
- One input for every form: use Text Field instead.
- Markdown that renders correctly while it streams: use Streaming markdown instead.
Installation
Form autofill is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add form-autofillUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Filled
A signature, filled with one field to review.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Empty
Waiting for a paste; try a sample.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Strict
A stricter gate (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
FormAutofill
| Prop | Type | Default | Description |
|---|---|---|---|
fields | Vec<FillField> | Default::default() | Fields (default: name, title, company, email, phone, address). |
title | String | "New contact" | Card title. |
description | String | "Paste a signature or notes. The agent fills the form." | One line under the title. |
model | String | "Haiku" | Model named beside the paste area. |
review_threshold | u8 | 80 | Below this confidence (0–100) a field asks for review. |
gate | bool | Default::default() | Oxyn plus: show the threshold control. |
submit_label | String | "Save contact" | Primary action. |
prefill | bool | Default::default() | Start with a sample pasted (review sheets). |
on_values_change | EventHandler<(String, String)> | — | Every value change: `(field, value)`. |
on_submit | EventHandler<Vec<(String, String)>> | — | Saved: every `(field, value)`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ⌘orCtrlV | Paste into the text area; the read starts right away |
| ⌘orCtrlEnter | Read typed text |
| Esc | Stop a read; nothing changes |
| Tab | Text area, Try sample, every field, the check buttons, Undo, Save |
Accessibility
- A polite region announces each step: reading, how many filled, which need review, undo and save.
- Each filled input has an aria-description with its confidence and reason; review fields are aria-invalid.
- Status is never colour alone: a dot plus a percentage or a word (Review, Checked, Edited).
From the spec
A polite region announces each step ("Reading the pasted text…", "Filled 6 fields. 1 need review.", "Check Address before saving", "Saved"). Each filled input has an aria-description with confidence and reason; review fields are aria-invalid. The pasted text is a focusable labelled region.
Motion & interaction
While reading, the model name shimmers. Each value fades in with a short tint on the field; its source in the pasted text highlights as it lands, and again on hover or focus of the field. The company field shows a logo slot. Status is a dot plus a word or percentage, never colour alone.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Read (demo) | 900 ms | — | same |
| Field stagger | 140 ms apart | — | 0 |
| Value fade | 200 ms | ease.out | 1 ms |
| Field tint | 900 ms | ease-out | none |
| Source highlight | 160 ms | ease.out | instant |
Responsive behaviour
- Side by side from a 720 px container; below that the paste well stacks on top.
- Under 440 px every field takes the full row.
Edge cases (spec)
Missing name: guessed from the email local part at low confidence. Personal email domains don't become companies. Phones without a country code are flagged. A second fill keeps Undo pointing at the values before the latest fill. Narrow: the paste well stacks over the form below 720 px; fields take the full row below 440 px. Very slow models: Stop stays available.
Notes for AI
- Import
FormAutofillfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
SmartFillElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.