Swish UI
All componentsFeedback and forms Pro

AI autofill form

An Autofill with AI button makes each empty field shimmer, type its value and settle, then a light sweeps the form.

The React code for this component comes with Pro.

Unlock with Pro

Use it for

  • Onboarding and signup forms that can guess details from a domain or account
  • Feature sections that show an AI assist saving typing
  • Settings pages where a smart default fills several fields at once

Avoid

  • Long forms, where a field by field sequence takes too long: fill them together
  • Sensitive fields like payment details, which people should always type themselves

How it works

The inputs stay uncontrolled, so the fill writes each character straight to input.value through a ref while React only tracks one state per field (thinking, typing, filled). A list of timeouts runs the sequence: a shimmering gradient and a pulsing ring while a field thinks, then the typed value, then a sparkle. Only empty fields are filled, so anything the visitor already typed is kept. A remounted overlay animates a light sweep across the grid at the end and the button swaps to a count of filled fields.

Accessibility

Every field is a real labelled input that stays editable, and the form announces the result through a status region. The autoplay loop stops as soon as the visitor touches the form. Reduced motion fills every field at once with no shimmer or sweep.

Get the source with Pro

The demo above is free to play with. Pro unlocks the source of this and every other Pro component, with copy-ready code and a zip download.

Already bought? Sign in

Found on