Components
PreviousNext

Phone Input

A phone input component that simplifies the phone input.

Installation

Anatomy

Phone Input component anatomy

Phone Input component anatomy

Usage

import { PhoneInputRoot, PhoneInputBase, PhoneInputFlagMenu } from '@kit/ui/phone-input';
<PhoneInputRoot value={value || ''} onPhoneInputChange={handleChange}>
    <PhoneInputFlagMenu className="bg-muted/50 focus-visible:bg-background" />
    <PhoneInputBase className={cn('max-w-md', value ? 'bg-muted/50 focus-visible:bg-background' : '')} />
</PhoneInputRoot>

Features

  • International zip code suggestions
  • Flag menu
  • Phone number formatting

API Reference

Root

PhoneInputRootProps

PropTypeDefault
value
string
onPhoneInputChange
function
defaultNumber
string
defaultCountryISO
CountryCode
'FR'
className
string

Flag Menu

Props: Omit<React.HTMLAttributes<HTMLButtonElement>, 'children' | 'type' | 'role'>

Base

The input component.

Props: React.InputHTMLAttributes<HTMLInputElement>

How is this guide?

Last updated on 1/29/2026