Specialized inputs

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.

React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.

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

1440pxHost theme
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.

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.club/c/phoneinput-007?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…

How to use

<Phoneinput007
  label="Work phone"
  extensionLabel="Extension"
  extensionPlaceholder="1234"
/>

A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.

Settings

Label
label · default: Work phone
Placeholder
placeholder · default: +44 20 7123 4567
Extension caption
extensionLabel · default: Extension
Extension stub
extensionPlaceholder · default: 1234
Note
hint · default: The extension is optional: without it we call the main line.
Accent
accent · default: theme colour
Background
background · default: theme colour

FAQ

How do I add With Extension with Cursor or Claude Code?
Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
What does With Extension depend on?
No npm packages beyond React and Tailwind CSS.
What can I change in With Extension?
Adapt: 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. Keep as installed: the local --vibeui-phoneinput-007-* palette — do not swap it for your theme tokens; autoComplete="tel-extension" on the extension: otherwise the browser pastes it into the main number; the layout on [data-part="shell"] rather than the root: @container never applies to the container itself.
Is With Extension free?
Yes. The preview is open without an account; with a free account you can copy up to 20 components a month.

For developers

npx shadcn@latest add https://vibeui.club/r/pro/phoneinput-007.json

This command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options

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…