Phone Input

Country Search

A phone field where the country is picked from a searchable list: the query filters by name and dial code, and the chosen country sets the number mask.

What you can change

  • the field name through label and the country set with masks through countries
  • the captions: searchPlaceholder on the search, countryLabel on the country button, emptyText for an empty result
  • the hint template with the {country}, {code} and {digits} placeholders

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.ru/c/phoneinput-009?lang=en&theme=dark

2Paste into the chat
3Get it in your project

Not sure where to paste it? Step-by-step guide

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

Loading…

For developers

The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.

Technical notes

A client component: the country, the search query and the raw digits live in useState. One file, no dependencies, the palette in the local --vibeui-phoneinput-009-* variables. The country picker is not a native select but a listbox of its own: a button with the flag and the dial code opens a panel with a search field and a list marked up as listbox and option. The search filters by name and by dial code, the up and down arrows move the active row across the matches, Enter picks, Escape closes and returns focus to the button; the active row is announced through aria-activedescendant instead of moving focus. The panel closes when focus leaves the block: onBlur compares relatedTarget against the block contents. The flag is an emoji, so there are no images and no icon packages. The mask lives in the country record: input is normalised to digits, so "+7 (999) 123-45-67" pasted from the clipboard becomes the same number as one typed by hand. The open prop unfolds the list in flow — that is the showcase and screenshot mode.

Tags

  • phone
  • country
  • search
  • listbox
  • client
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…