Phone Input
With Extension
A phone field with a separate extension input: two values mean two fields with different autofill hints, and the narrow one states its own length.
What you can change
- the main field name through label, the extension caption through extensionLabel and its stub through extensionPlaceholder
- the focus color through accent
- the extension width and the @container breakpoint
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/phoneinput-007?lang=en&theme=dark
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
The component is self-contained: one file, zero dependencies, the palette in the local --vibeui-phoneinput-007-* variables. Server component: useId is the only hook. The extension is moved into its own field with autoComplete="tel-extension", so the browser does not paste it inside the main number and does not confuse autofill. The root is declared container-type: inline-size, and the layout sits on the inner shell [data-part="shell"]: a rule inside @container does not apply to the container itself. From 20rem of the component's own width the fields line up in a row, with 6rem given to the extension — the width itself says three or four digits belong there; at a narrow width the fields stack. Bottom alignment (align-items: flex-end) keeps the field borders on one line when the captions differ in length.
Tags
- phone
- extension
- container-query
- form
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…