Skip to content

Shadcn Phone Input (damianricobelli)

A formatted phone input powered by libphonenumber-js, with country data and a helper that parses numbers.

shadcn-phone-input-five.vercel.app

Shadcn Phone Input (damianricobelli) website screenshot
Added
GitHub stars
277

About

About Shadcn Phone Input (damianricobelli)

Shadcn Phone Input is a simple, formatted phone input built with shadcn/ui and libphonenumber-js. The demo shows a country flag, a default field and a form that asks for a valid phone number with country. A utility called getPhoneData returns the phone number, country code, country calling code, national and international formats, a tel URI and possible countries, and flags whether the number is valid or only possible.

Country data and ISO codes are loaded from the API of the open-source countries-states-cities-database project. The page notes that a pull request for shadcn/ui is coming. The repository README is the default Next.js text, so setup is by reading the code, and no license is listed. Its last push dates to April 2024. It suits forms that need parsed, validated phone data rather than a raw string.

Shadcn Phone Input (damianricobelli) features

5 features

  • Formatted phone input with flags
  • getPhoneData helper for parsed details
  • Valid and possible number checks
  • International format and tel URI output
  • Country data from an open database

What you can build with Shadcn Phone Input (damianricobelli)

3 use cases

  • Validating phone numbers on a signup form
  • Saving numbers in international format
  • Reading the country calling code from user input

Pricing

Ship it with Pro

The directory is free. Pro adds 6,000+ blocks, 14 premium templates and the MCP server, so your AI editor installs them for you.

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

What Shadcn Phone Input (damianricobelli) is, how to install it, its license and its alternatives.

4.9 out of 5 from 150+ developers

Found your stack? Ship it.

6,000+ blocks, premium templates and MCP in every Pro plan. The directory stays free.

Get Pro