shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
75.62k stars 4.75k forks source link

[feat]: Need to create phone number input component like "React-Phone-Input-2" #4596

Open NadirBakhsh opened 3 months ago

NadirBakhsh commented 3 months ago

Feature description

Feature Description: Phone Number Input Component Feature Name: PhoneNumberInput

Category: Form Controls

Description: The PhoneNumberInput component is designed to allow users to input and format phone numbers in a standardized and user-friendly manner. This component is essential for applications that require phone number input with country code selection, automatic formatting, and validation.

Why It's Needed: Currently, the Shadcn UI library lacks a specialized phone number input component that handles country code selection, formatting, and validation in one package. Adding this component will enhance the form controls offering, providing developers with a ready-to-use solution for phone number inputs, which are common in many web applications.

Affected component/components

No response

Additional Context

<PhoneNumberInput label="Phone Number" defaultCountry="US" required onChange={(value) => console.log(value)} />

  Example like: https://www.npmjs.com/package/react-phone-input-2

Before submitting

Kumar06Lav commented 3 months ago

Hi team, I'd like to take on this issue. Could you please assign it to me? Thanks!

Yohannfra commented 1 month ago

You can use this component https://shadcn-phone-input.vercel.app/