Email Input

Email Input is a copy-paste React component that stops signup lost to gmial.con typo 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/email-input
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 3 extra npm packages
  • A11y guidance in docs

StopsSignup lost to gmial.con typo

Was this component page useful?

How do I install Email Input?

pnpm dlx shadcn@latest add @bollard/email-input

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

How do I use Email Input in React?

email-input-usage.tsx
import { EmailInput } from "@/components/ui/email-input"

<EmailInput label="Work email" defaultValue="priya.sharma@gmial.con" />

What input mistakes does Email Input catch?

  • Misspelled common domains (gmial.con, rediffmial.com)
  • Swapped letters, via Damerau-Levenshtein distance
  • Typos avoided altogether, with provider completions while typing (completeDomains)

What props does Email Input accept?

EmailInput props
PropTypeDefault
label

Visible label.

string"Email"
hint

Helper text shown under the field while there is nothing to warn about.

string—
value

Controlled value.

string—
defaultValue

Initial value when uncontrolled.

string""
onValueChange

Called with the cleaned value (spaces removed) on every change.

(value: string) => void—
domains

Domains to compare against. Defaults to common global and Indian providers.

string[]COMMON_EMAIL_DOMAINS
delay

Pause in ms before warnings appear while typing. Leaving the field shows them at once.

number700
typoMessage

Text shown before the suggested domain.

string—
keepLabel

Accessible label of the button that keeps the address as typed.

string—
completeDomains

Offer matching providers in a list while the domain is being typed. Default true.

booleantrue
messages

Override any text (see `EMAIL_INPUT_MESSAGES`). `typoMessage` and `keepLabel` props still win.

Partial<EmailInputMessages>—

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

How is Email Input accessible?

  • Visible <label>; hints via aria-describedby
  • With completions on: role="combobox", a role="listbox", aria-activedescendant and arrow, Enter/Tab and Escape keys
  • Fix returns focus to the input; motion respects prefers-reduced-motion

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

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Verify ownership with a confirmation email before relying on the address.

  • Only knows the domains in its list; a typo of an unlisted domain isn't caught
  • It doesn't check that the mailbox exists

What expensive mistakes does Email Input stop?

Signup lost to gmial.con typo

Also known as

email · email field · signup · newsletter · mailcheck · domain suggestion · login · register

Field type

What dependencies does Email Input require?

Email Input facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameEmail Input
Registry identifier@bollard/email-input
Install commandnpx shadcn@latest add @bollard/email-input
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)
Dependencies@floating-ui/react, lucide-react, motion
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 Email Input

What form validation mistake does Email Input catch?

Email Input prevents signup lost to gmial.con typo. Spots misspelled email domains like gmial.con and offers a one-tap fix, never an automatic one, so sign-ups don't bounce. Catches: Misspelled common domains (gmial.con, rediffmial.com), Swapped letters, via Damerau-Levenshtein distance, Typos avoided altogether, with provider completions while typing (completeDomains). Limitation: validate email-input schemas on backend.

How do I install email-input with shadcn?

Run `npx shadcn@latest add @bollard/email-input`. Sources added: registry/default/email-input/email-domains.ts, registry/default/email-input/email-input.tsx. Package requirements: @floating-ui/react, lucide-react, motion.

What props customize Email Input?

Email Input accepts `label`, `hint`, `value`, `defaultValue`, `onValueChange`. Configures email, email field, signup behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of email-input?

Only knows the domains in its list; a typo of an unlisted domain isn't caught. It doesn't check that the mailbox exists Server requirement: Verify ownership with a confirmation email before relying on the address.

How does Email Input meet accessibility guidelines?

Visible <label>; hints via aria-describedby. With completions on: role="combobox", a role="listbox", aria-activedescendant and arrow, Enter/Tab and Escape keys. Fix returns focus to the input; motion respects prefers-reduced-motion. Minimizes errors: email typo gmail, bounced signup emails.

Which components pair with Email Input?