nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.15k stars 554 forks source link

Phone number input component #2815

Open Nyantekyi opened 1 day ago

Nyantekyi commented 1 day ago

For what version of Nuxt UI are you suggesting this?

v3.0.0-alpha.x

Description

I would really like an implementation of the phone number component. I searched online and found an implementation that uses shadcn vue https://shadcn-vue-phone-input.vercel.app/ . This would be an awesome addition and a very useful feature for my use case. Thanks in advance

Additional context

No response

MickL commented 17 hours ago

Does this actually need a component? What I see there is a SelectMenu and an Input. What is exactly needed that you cant build with Nuxt UI right now?

What comes tricky about phone numbers is the form validation. But validation is handled by a third party library like Zod, Yup, Joi, Valibot etc. so the validation is also something Nuxt UI cant provide.

benjamincanac commented 10 hours ago

I think we can make an example like we did here: https://ui3.nuxt.dev/components/select-menu#as-a-countrypicker