mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-08 22:45:47 +00:00
22 lines
469 B
TypeScript
22 lines
469 B
TypeScript
"use client"
|
|
|
|
import {
|
|
InputOTP,
|
|
InputOTPGroup,
|
|
InputOTPSlot,
|
|
} from "@/examples/base/ui/input-otp"
|
|
import { REGEXP_ONLY_DIGITS } from "input-otp"
|
|
|
|
export function InputOTPFourDigits() {
|
|
return (
|
|
<InputOTP maxLength={4} pattern={REGEXP_ONLY_DIGITS}>
|
|
<InputOTPGroup>
|
|
<InputOTPSlot index={0} />
|
|
<InputOTPSlot index={1} />
|
|
<InputOTPSlot index={2} />
|
|
<InputOTPSlot index={3} />
|
|
</InputOTPGroup>
|
|
</InputOTP>
|
|
)
|
|
}
|