omeralpi / shadcn-phone-input

Customizable phone input component with proper validation for any country. Built on top of shadcn.
https://shadcn-phone-input.vercel.app
MIT License
422 stars 28 forks source link

NextJS Server Actions form #33

Closed 4fort closed 1 week ago

4fort commented 2 months ago

how do you use this without zod and purely native form

omeralpi commented 2 months ago

🤔 Basically

import { PhoneInput } from "@/components/ui/phone-input";

const [phoneNumber, setPhoneNumber] = useState("");

<PhoneInput
  value={phoneNumber}
  onChange={setPhoneNumber}
  defaultCountry="TR"
  placeholder="Enter a phone number"
/>