Skip to content

Shadcn Phone Input

Shadcn Phone Input is a customizable international phone number input component built specifically for shadcn/ui with comprehensive validation for any country worldwide.

Shadcn Phone Input — preview
Author
Omeralpi
Updated

Live preview

Live Preview

Interact with the actual deployed template — every section, every interaction, no mockups.

shadcn-phone-input.vercel.app

Open in a new tab (opens in a new tab)

Loading preview…

About

About Shadcn Phone Input

The MIT-licensed component provides seamless country selection with flag icons, automatic formatting based on selected country, and robust validation using the react-phone-number-input library integrated with Zod for form validation. Built with React, TypeScript, Tailwind CSS, and shadcn/ui components, the phone input fills a gap in the shadcn ecosystem by providing a production-ready solution for international phone number collection with proper validation and formatting.

The component supports optional phone number fields, clear error messaging for invalid numbers, and flexible form integration with React Hook Form. Perfect for user registration forms, contact information collection, e-commerce checkout flows, or any application requiring international phone number input with proper validation, country detection, and a clean modern UI design that matches shadcn/ui's aesthetic.

Get started

Free, open source, and ready to ship.

Clone the repo, install dependencies, and start customising. Shadcn Phone Input is free and open source: its license is in the repository.

  1. Clone the Shadcn Phone Input repository from GitHub.
  2. Run npm install or pnpm install to install all required packages.
  3. Run npm run dev to start the development server and begin customizing.
  4. Check the repository’s README and license before you ship.

Terminal

$ git clone https://github.com/omeralpi/shadcn-phone-input
$ cd shadcn-phone-input
$ npm install
$ npm run dev

Included in Pro

More Templates

Hand-built premium templates from shadcn.io — production-ready and bundled in Pro.

Every template, every block. One Pro plan unlocks all 14, with 6,000+ blocks and MCP for your AI editor.

Get Pro

Pricing

Every premium template, with Pro

All 14 premium templates come with every Pro plan, with 6,000+ blocks and the MCP server. Pick the seats you need.

4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.

  • Secure checkout via Stripe
  • Code lives in your repo
  • Keep what you've shipped if you cancel
  • License terms

FAQ

Frequently asked questions

Everything you need to know before you ship with Shadcn Phone Input.

4.9 out of 5 from 150+ developers

Ship your next site this weekend

14 premium templates, 6,000+ blocks and MCP in every Pro plan. Shadcn Phone Input and the other 214 open source templates stay free.

Get Pro