ebnsina

Phone Input

Component

About

A phone number form field that lets you pick or search a country, auto-formats the number as you type, follows a pasted international number to the right country, and shows a plain-language validity message.

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 PhoneInputErrorDemo() {
  return (
    <div className="w-full max-w-sm">
      <PhoneInput
        label="Phone"
        value="+60312345678"
        error="This number is already on another library card."
      />
    </div>
  );
}

Dependencies

More by ebnsina

View all
  • Countdown Timer

    Countdown Timer

    35
  • Video Player

    Video Player

    26
  • Alarm Clock

    Alarm Clock

    24
  • Hourglass Timer

    Hourglass Timer

    20
  • Voice Note

    Voice Note

    19
  • Sortable List

    Sortable List

    18
  • Sign In Auth Card

    Sign In Auth Card

    14
  • Split Button

    Split Button

    13