{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "input-otp", "type": "registry:ui", "dependencies": [ "lucide-react", "input-otp" ], "files": [ { "path": "components/ui/input-otp.tsx", "content": "\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { OTPInput, OTPInputContext } from \"input-otp\"\r\nimport { MinusIcon } from \"lucide-react\"\r\n\r\nimport { cn } from \"@/lib/utils\"\r\n\r\nfunction InputOTP({\r\n className,\r\n containerClassName,\r\n ...props\r\n}: React.ComponentProps & {\r\n containerClassName?: string\r\n}) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\r\n return (\r\n \r\n )\r\n}\r\n\r\nfunction InputOTPSlot({\r\n index,\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"div\"> & {\r\n index: number\r\n}) {\r\n const inputOTPContext = React.useContext(OTPInputContext)\r\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\r\n\r\n return (\r\n \r\n {char}\r\n {hasFakeCaret && (\r\n
\r\n
\r\n
\r\n )}\r\n
\r\n )\r\n}\r\n\r\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\r\n return (\r\n
\r\n \r\n
\r\n )\r\n}\r\n\r\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\r\n", "type": "registry:ui", "target": "components/ui/input-otp.tsx" } ] }