Phone input for Koreakr
Korea preset for phone-input with progressive hyphenation, Korean number validation and an E.164 value.
설치
pnpm
pnpm dlx shadcn@4.23.0 add @uikit/phone-input-kr의존 아이템localephone-inputstyle
Default
phone-input-kr-demo.tsx
"use client";
import * as React from "react";import { PhoneInputKr } from "@/components/ui/phone-input-kr";
export default function PhoneInputKrDemo() { const [e164, setE164] = React.useState<string | null>(null); return ( <div className="flex w-80 flex-col gap-2"> <PhoneInputKr name="phone" onValueChange={(value) => setE164(value.e164)} /> <p className="text-sm text-muted-foreground">E.164: {e164 ?? "none"}</p> </div> );}