Installation
Install the following dependencies:
We use the light-weight (145kB) libphonenumber-js library for the phone number validation.
Copy and paste the following code into your project.
'use client';
import { cn } from '@kit/shared';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@kit/ui/dropdown-menu';
import { Icon } from '@kit/ui/icon';
Get the Kit
Kit required to see the full codeUpdate the import paths to match your project setup.
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
Prop | Type | Default |
---|---|---|
value | string | |
onPhoneInputChange | function | |
defaultNumber | string | |
defaultCountryISO | CountryCode | 'FR' |
Flag Menu
Props: Omit<React.HTMLAttributes<HTMLButtonElement>, 'children' | 'type' | 'role'>
Base
The input component.
Props: React.InputHTMLAttributes<HTMLInputElement>
Number Input
An enhanced number input with keyboard, mouse wheel, and drag controls.
Progression
A progression component to display scroll progress through content.
How is this guide?
Last updated on 10/17/2025