Phone Input
Telephone field with country calling code selection.
Installation
bun add @xerobi/ui
import { PhoneInput } from "@xerobi/ui/phone-input"This component is client-side. In Astro, hydrate it with a client directive.
API reference
PhoneInput
| Prop | Type | Description |
|---|---|---|
| value* | string | |
| country | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH... | |
| label | string | |
| error | boolean | |
| helperText | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | |
| disableSelect | boolean | |
| onChange* | (newValue: string) => void | |
| labels | { search?: string | undefined; clear?: string | undefined; } |