Autofill Check

Autofill Check is a copy-paste React component that stops autofill put email in name field before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/autofill-check
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsAutofill put email in name field

Was this component page useful?

How do I install Autofill Check?

pnpm dlx shadcn@latest add @bollard/autofill-check

The files land in your project. They're yours to edit.

How do I use Autofill Check in React?

autofill-check-usage.tsx
import { AutofillCheck } from "@/components/ui/autofill-check"

<AutofillCheck reference={{ address: "B-204, Sai Residency, Baner Road" }}>
  {field("name", "Full name", { autoComplete: "name" })}
  {field("email", "Email", { type: "email", autoComplete: "email" })}
  {field("tel", "Phone", { type: "tel", autoComplete: "tel" })}
  {field("address", "Delivery address", { autoComplete: "street-address" })}
  <div className="flex items-center justify-between gap-2">
    <button type="button" onClick={simulate} className="h-8 rounded-md px-3 text-sm text-muted-foreground hover:bg-accent outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50">
      Autofill again
    </button>
    <button type="submit" className="h-9 rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50">
      {sent ? "Sent" : "Place order"}
    </button>
  </div>
</AutofillCheck>

What input mistakes does Autofill Check catch?

  • Fields filled without typing, detected by the :autofill hook or a timing heuristic
  • Values that do not fit the field (an email in Name, a number in Email)
  • Values that differ from what the account already holds (an old address), with a one-tap replacement
  • The same value filled into two different fields

What props does Autofill Check accept?

AutofillCheck props
PropTypeDefault
reference

What the account already holds, by field name. An autofilled value that differs (an old address) is flagged.

Record<string, string>{}
holdSubmit

Stop the first submit while a filled value looks wrong, and move focus to it. The second submit goes through.

booleantrue
batchWindow

Fields set without typing within this many ms of each other count as one fill (password managers, Firefox).

number120
onAutofill

Called with the field names each time a fill is detected.

(fields: string[]) => void—
message

Text. `{count}` is filled in; `{value}` and `{other}` in the reasons.

string"{count} fields were filled by your browser. Check them."
suspectText

Banner text when a filled value looks wrong.

string"{count} look wrong"
heldText

Banner text when the first submit was held.

string"Check the outlined fields first, then send again."
reviewedLabel

Text for the button that marks all filled fields as reviewed.

string"Looks right"
clearLabel

Text for the button that clears a suspect value.

string"Clear"
useLabel

Text for the button that uses the account's value instead.

string"Use {value}"
reasons

Override the explanation shown for each kind of issue.

Partial<Record<FilledIssue["reason"], string>>—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Autofill Check accessible?

  • Review banner is aria-live="polite" and becomes role="alert" when a submit is held
  • A held submit moves focus to the first suspect field; list entries focus their field
  • The highlight animation respects prefers-reduced-motion
  • Field names in the list come from their <label> or aria-label

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Detection is heuristic; some password managers and browsers fill in ways it cannot see, and fast pasting can look like autofill
  • Field types are guessed from autocomplete, type and name attributes
  • The first submit is held only once; the second goes through

What expensive mistakes does Autofill Check stop?

Autofill put email in name field

Also known as

autofill · autocomplete · password manager · chrome autofill · address form · checkout form · 1password

What dependencies does Autofill Check require?

Autofill Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameAutofill Check
Registry identifier@bollard/autofill-check
Install commandnpx shadcn@latest add @bollard/autofill-check
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Autofill Check

How does Autofill Check prevent financial transaction errors?

Autofill Check prevents autofill put email in name field. Blocks Fields filled without typing, detected by the :autofill hook or a timing heuristic, Values that do not fit the field (an email in Name, a number in Email), Values that differ from what the account already holds (an old address), with a one-tap replacement, The same value filled into two different fields before processing. Limitation: apply idempotency keys for autofill-check.

How do I install autofill-check with shadcn?

Run `npx shadcn@latest add @bollard/autofill-check`. Sources added: registry/default/autofill-check/autofill-check.tsx, registry/default/autofill-check/autofill-rules.ts. Package requirements: lucide-react.

What props customize Autofill Check?

Autofill Check accepts `reference`, `holdSubmit`, `batchWindow`, `onAutofill`, `message`. Configures autofill, autocomplete, password manager behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of autofill-check?

Detection is heuristic; some password managers and browsers fill in ways it cannot see, and fast pasting can look like autofill. Field types are guessed from autocomplete, type and name attributes. The first submit is held only once; the second goes through Server requirement: backend verification for autofill-check.

How does Autofill Check meet accessibility guidelines?

Review banner is aria-live="polite" and becomes role="alert" when a submit is held. A held submit moves focus to the first suspect field; list entries focus their field. The highlight animation respects prefers-reduced-motion. Field names in the list come from their <label> or aria-label. Minimizes errors: autofill wrong field, password manager filled wrong.

Which components pair with Autofill Check?