Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Inputs

Email Input

Inputs

Email Input React component for Tailwind CSS v4

Duration PickerEmoji Picker
Live props
Behavior
multiple
suggestTypos
showValidIcon
clearable
maxNo limit
invalidEntries
Field
label
description
error
required
invalid
disabled
readOnly
defaultValue
Content
placeholder
name
Appearance
showAvatars
size
variant
radius
chipVariant
tone
color
Code
import { EmailInput } from "@/components/ui/email-input"

<EmailInput />
  1. Home
  2. Components
  3. Inputs
  4. Email Input
Pro

Email Input React component for Tailwind CSS v4

v1.0.0·Added in 1.5.0

A React email input for one address or a list of recipients, with domain completion, typo hints, contact suggestions and validation.

One address: type a name and after the @ a list completes the domain (emma@gm offers emma@gmail.com); Arrow Down and Up move through it, Enter or Tab takes the highlighted address, Escape closes it. Leaving the field checks the address: a malformed one shows the error, a likely typo shows "Did you mean emma@gmail.com?" with the fix as a button, and a valid one gets a green check. The error goes away as soon as the text is fixed. With multiple, every address becomes a chip with the person's initials or photo: type and press Enter, a comma, a semicolon or a space after a full address; pick a contact from the list by name or address; or paste a whole list like Emma Carter <emma@acme.com>, liam@acme.com; olivia@acme.com and every entry becomes a chip with its name, duplicates once (the existing chip pulses). A bad address stays as a red chip and the field says why; a likely typo turns its chip amber and the hint fixes it in one tap. Backspace in the empty text brings the last chip back as text to fix. Arrow Left at the start of the text moves onto the chips: Left and Right walk, Home and End jump, Delete or Backspace removes, Enter or F2 (or a double-click, or a second tap) edits, Cmd/Ctrl+C copies Name <address>, Escape returns to the text. Cmd/Ctrl+Enter adds the text and submits the form. On a phone the keyboard shows the email layout, text is 16px so iOS never zooms, the chip × buttons have a large touch area and the list stays in the page above the keyboard.

Email Input is a Pro React component in the React input components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add email-input, together with Avatar, Badge, Field, Listbox, useControllableState and 4 more and the npm packages motion and lucide-react.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add email-input

Email Input is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans or unlock it free with an account

Usage

Import EmailInput from @/components/ui/email-input.

import { useState } from "react"
import { EmailInput, type EmailContact } from "@/components/ui/email-input"

const CONTACTS: EmailContact[] = [
  { name: "Emma Carter", email: "emma@acme.com" },
  { name: "Liam Brooks", email: "liam@acme.com" },
  { name: "Olivia Bennett", email: "olivia.bennett@gmail.com" },
]

export function NewMessage() {
  const [from, setFrom] = useState("")
  const [to, setTo] = useState<string[]>(["emma@acme.com"])

  return (
    <div className="flex flex-col gap-4">
      <EmailInput label="Your email" value={from} onValueChange={setFrom} name="from" required />
      <EmailInput multiple label="To" value={to} onValueChange={setTo} contacts={CONTACTS} name="to" clearable />
    </div>
  )
}

Props

  • multipledefault false
    boolean

    A list of recipients as chips; value becomes string[]. Off, the field holds one address as a string.

  • labeldefault ""
    ReactNode

    Renders the field anatomy around the box: the label above it, linked to the text input.

  • descriptiondefault ""
    ReactNode

    Helper text under the box. A typo hint takes its place while it shows; at the limit labels.limit(max) does when you pass none.

  • errordefault ""
    ReactNode

    Replaces the description with the animated error and marks the field invalid. Without it the field shows its own checks.

  • requireddefault false
    boolean

    The red mark after the label and required / aria-required on the text input.

  • invaliddefault false
    boolean

    The invalid look and aria-invalid without a message.

  • disableddefault false
    boolean

    Dims the field, blocks typing and hides the × on chips.

  • readOnlydefault false
    boolean

    The value stays visible and selectable but cannot change; chips stay focusable and copyable.

  • placeholderdefault "name@example.com"
    string

    Hint text while empty. Multiple mode defaults to Add people by name or email.

  • value
    string | string[]

    The address (single) or the addresses (multiple), controlled; pair it with onValueChange.

  • defaultValuedefault ""
    string | string[]

    The starting value while uncontrolled: a string in single mode, a list in multiple mode. A form reset returns to it. The playground takes a comma-separated list in multiple mode.

  • onValueChange
    (value: string | string[]) => void

    Fires with the new text on every keystroke (single), or with the new list after every add, remove, fix and clear (multiple).

  • onChange
    (event: ChangeEvent<HTMLInputElement>) => void

    The native change event of the text input, untouched.

  • contactsdefault "[]"
    EmailContact[]

    People suggested while typing, matched by name, address or keywords (case and diacritics ignored). Chips of a known address show the name and photo.

  • domainsdefault "EMAIL_DOMAINS"
    string[]

    Completed after the @ and used for typo hints (gmail.com, outlook.com, yahoo.com, icloud.com...). [] turns both off.

  • allowedDomains
    string[]

    Only addresses at these domains are accepted (labels.domain names them); they also become the completions after the @.

  • validate
    (email: string) => (string | boolean)

    Extra rules after the format check: false marks the address invalid with the default message, a string with that message.

  • suggestTyposdefault true
    boolean

    Did you mean emma@gmail.com? under the field for a likely typo in the domain (gmial.com, gmail.con, gmail without .com).

  • showValidIcondefault true
    boolean

    Single mode: a green check at the end once the address is valid and the field was left.

  • clearabledefault false
    boolean

    A clear button while there is a value: the text (Escape clears too) or every recipient.

  • maxdefault 0
    number

    Multiple mode: the most recipients. At the limit the text hides and the description reads labels.limit(max). 0 means no limit.

  • invalidEntriesdefault "keep"
    "keep" | "reject"

    Multiple mode: keep a bad address as a red chip to fix later (like a mail app), or leave it in the text, shake and show why.

  • showAvatarsdefault true
    boolean

    Multiple mode: the contact's photo or colored initials in each chip; the chips turn into pills.

  • leftIcondefault "<Mail />"
    ReactNode

    Single mode: the leading icon; null hides it.

  • sizedefault "md"
    "sm" | "md" | "lg"

    Height 32 / 40 / 48px (md 44px on touch), 20 / 24 / 28px chips, 13 / 14 / 15px text (16px on phones). The multiple box grows as chips wrap.

  • variantdefault "soft"
    "soft" | "outline" | "underline" | "ghost"

    The box look shared with every input.

  • radiusdefault "md"
    "none" | "sm" | "md" | "lg" | "full"

    Box corners scaled with the size.

  • chipVariantdefault "soft"
    "soft" | "outline" | "solid"

    Multiple mode: the Badge variant of the chips.

  • tonedefault "neutral"
    "neutral" | "brand" | "success" | "warning" | "danger" | "info"

    Multiple mode: the color of valid chips. Bad addresses are always danger, likely typos warning.

  • colordefault ""
    string

    Any CSS color for valid chips; replaces the tone.

  • namedefault ""
    string

    Single mode: the input's name. Multiple mode: one hidden input per address, so FormData.getAll(name) returns the list.

  • labels
    Partial<EmailInputLabels>

    Copy merged over the English defaults: invalid, invalidEntry(email), invalidCount(n), domain(domains), didYouMean(fix), useSuggestion(email), recipient(label, email), remove, added, removed, duplicate, limit(max), copied(email), clear, suggestions.

  • onReject
    (email: string, reason: "invalid" | "duplicate" | "limit" | "domain") => void

    Called for every address that was turned away or flagged.

  • fieldProps
    Partial<FieldProps>

    Anything else for the Field wrapper: optional, labelAction, orientation, labelWidth, hideLabel.

  • ref
    RefObject<HTMLInputElement | null> or (node) => void

    The text input. Every other native prop lands there too: autoFocus, autoComplete, enterKeyHint, onBlur, onKeyDown (runs first), aria-*, data-*.

  • classNames
    Partial<Record<"field" | "label" | "description" | "error" | "counter" | "root" | "box" | "icon" | "input" | "chip" | "valid" | "clear" | "hint" | "suggestions" | "list" | "option", string>>

    Extra classes for the parts: the field anatomy, the box, the icon, the text input, each chip, the valid check, the clear button, the typo hint and the suggestions panel.

  • className
    string

    Classes for the outermost element: the Field root when there is a label, description or error, else the email input root.

Parts

  • isValidEmail

    function

    The format check the field uses: one @, a sensible local part and a domain with a TLD of 2 or more letters, 254 characters at most.

    • email
      string

      The address to check.

    • returns
      boolean

      true when the format is valid.

  • normalizeEmail

    function

    Trims, drops mailto: and angle brackets and lowercases the domain. The field runs it on every address it keeps.

  • suggestEmailFix

    function

    The typo check behind the hint: emma@gmial.com gives emma@gmail.com, liam@acme.con gives liam@acme.com, and null when nothing looks wrong.

    • email
      string

      The address to check.

    • domainsdefault "EMAIL_DOMAINS"
      string[]

      The known domains to compare against.

    • returns
      string | null

      The corrected address, or null.

  • parseEmailList

    function

    Splits a pasted list on commas, semicolons, tabs and new lines (quotes and <> respected) into { email, name? } entries: "Emma Carter <emma@acme.com>, liam@acme.com".

  • EMAIL_DOMAINS

    constant

    The default domains completed after the @ and used for typo hints: gmail.com, outlook.com, yahoo.com, icloud.com, hotmail.com, proton.me and more.

  • EmailContact

    type

    A suggested person: { email, name?, avatar?, keywords? }.

  • EmailEntry

    type

    One parsed entry from parseEmailList: { email, name? }.

  • EmailInputLabels

    type

    Every string the field shows or announces, for the labels prop.

Examples

Sign up

One address with domain completion, a typo hint, the valid check and a form submit.

Compose

To and Cc with contacts suggested by name or address.

Paste a list

invalidEntries keep (red chips) next to reject (text stays and shakes).

Company only

allowedDomains, max={5} and brand chips in a pill box.

Styles

Sizes, box variants, chip variants, tones, no avatars and a custom color.

States

A server error, read only and disabled.

Dependencies

motionlucide-reactavatarbadgefieldlistboxuse-controllable-statemotiontext-matchtonesui-config

Files

  • components/ui/email-input.tsx

FAQ

Is the React Email Input component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Email Input?

Run npx wingo-ui@latest add email-input. It also adds the Wingo UI items it builds on (Avatar, Badge, Field, Listbox, useControllableState and 4 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/email-input.

How does Email Input behave on phones?

On a phone the keyboard shows the email layout, text is 16px so iOS never zooms, the chip × buttons have a large touch area and the list stays in the page above the keyboard.

See also

Tag InputInputFieldAvatarMulti Select

Used in

Share Dialog

More React input components

Emoji PickerFile UploadFilter BuilderInput GroupListboxMention Input
All 40 React input components

Articles using this component

  • React Tag Input: Chips from Typing, Paste and Suggestions

    Component guides · Oct 13, 2026 · 8 min read

New components by email

New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.

PreviousDuration PickerNext Emoji Picker

Create your account

Start your 14-day free trial

""

+typos+check

Type emma@gm and press Tab, or try emma@gmial.com and leave the field.Type emma@gm, or try emma@gmial.com