About
A telephone number field paired with a native country dialing-code selector that preserves the user's own formatting.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Phone Input to your project and fits it to your theme.
Code
How Phone Input is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { PhoneInput } from "@/components/ui/phone-input";
export default function PhoneInputDemo() {
return (
<div className="w-full max-w-sm rounded-xl border bg-card p-5 shadow-sm">
<p className="text-sm font-semibold">Contact number</p>
<p className="mt-1 mb-4 text-xs text-muted-foreground">
We will only use this for account recovery.
</p>
<PhoneInput
label="Contact number"
defaultCountryCode="+91"
placeholder="Your phone number"
/>
</div>
);
}
















