Phone input

Core

A phone field with a country picker, formatting as you type, and E.164 output.

pnpm dlx shadcn@latest add https://wui.alann.works/r/phone-input.json

API Reference

PropTypeDefault
label*stringrequired
hideLabelboolean—
valuestring—
defaultValuestring—
onValueChange(value: string, details: PhoneInputDetails) => void—
countrystring—
defaultCountrystring—
onCountryChange(iso: string) => void—
countriesstring[]—
preferredCountriesstring[]—
descriptionstring—
errorstring—
validateboolean—
disabledboolean—
requiredboolean—
namestring—
idstring—
classNamestring—
onBlur(event: ReactFocusEvent<HTMLInputElement>) => void—
Categories
inputs
Dependencies
lucide-reactmotion