Command Palette

Search for a command to run...

Phone Input

Phone Input allows user to enter phone number in E.164 format.

Loading...

Installation

pnpm dlx shadcn@latest add https://ui-x.junwen-k.dev/r/phone-input.json

Usage

import { PhoneInput } from "@/components/ui/phone-input";
<PhoneInput>
  <PhoneInputCountrySelect>
    <PhoneInputCountrySelectTrigger>
      <PhoneInputCountrySelectValue />
    </PhoneInputCountrySelectTrigger>
    <PhoneInputCountrySelectContent>
      <PhoneInputCountrySelectOptions />
    </PhoneInputCountrySelectContent>
  </PhoneInputCountrySelect>
  <PhoneInputInput />
</PhoneInput>

Examples

Default

Loading...

Separated

Loading...

Combobox

Loading...

Form

You can use parsePhoneNumber to retrieve additional information about the phone number, such as country, national number, and more.

Loading...