/ui
  • Components
  • Packages
  • About
  • Github
Menu
Components
Packages
Built by vorhdam at Nordaun. The source code is available on Github

Phone

A simple but clean phone input with a region selection so you dont have to worry about messing up.

Preview

Installation

bunx --bun shadcn@latest add @nordaun/phone

Usage

/components/phone-demo.tsx
1import { Phone } from "@/components/ui/phone";
2
3export default function PhoneDemo() {
4 return (
5 <div className="py-4 max-w-xs w-full mx-auto">
6 <Phone
7 placeholder="Enter your phone number"
8 searchPlaceholder="Search for your country"
9 emptyPlaceholder="Couldn't find your country"
10 />
11 </div>
12 );
13}

Dependencies

lucide-react libphonenumber-js command input-group popover