Command Palette

Search for a command to run...

Docs
Phone Input

A phone input component

Installation

pnpm dlx shadcn@latest add "https://ui.ednesdayw.com/r/phone-input.json"

Usage

import { PhoneInput } from "@/components/ui/phone-input";
 
export const items = [
  {
    name: "United States",
    flag: "🇺🇸",
    code: "US",
    mask: "(999) 999-9999",
    dialCode: 1,
  },
  {
    name: "Hong Kong",
    flag: "🇭🇰",
    code: "HK",
    mask: "9999 9999",
    dialCode: 852,
  },
];
 
const Page = () => {
  return <PhoneInput items={items} />;
};

Example

Size

Variant

Disabled

Invalid