{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "input-otp", "title": "Input OTP", "description": "One-time password input with individual digit slots for verification codes.", "dependencies": [ "input-otp" ], "files": [ { "path": "packages/ui/src/input-otp.tsx", "content": "\"use client\";\n\nimport { OTPFieldPreview as OTPField } from \"@base-ui/react/otp-field\";\nimport {\n LoaderCircle as LoaderCircleIcon,\n Minus as MinusIcon,\n} from \"lucide-react\";\nimport type * as React from \"react\";\nimport { cn } from \"./utils\";\n\nexport type InputOTPProps = Omit & {\n /**\n * Whether the input is in a loading state\n */\n isLoading?: boolean;\n};\n\nconst InputOTP = ({\n className,\n isLoading = false,\n disabled,\n children,\n ...props\n}: InputOTPProps) => (\n
\n \n {children}\n \n {isLoading && (\n \n )}\n
\n);\n\nInputOTP.displayName = \"InputOTP\";\n\nexport interface InputOTPGroupProps extends React.ComponentProps<\"div\"> {}\n\nexport const InputOTPGroup = ({\n className,\n ref,\n ...props\n}: InputOTPGroupProps & React.RefAttributes) => (\n \n);\n\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\nexport type InputOTPSlotProps = OTPField.Input.Props;\n\nexport const InputOTPSlot = ({ className, ...props }: InputOTPSlotProps) => (\n \n);\n\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\nexport type InputOTPSeparatorProps = OTPField.Separator.Props;\n\nexport const InputOTPSeparator = ({\n className,\n children,\n ...props\n}: InputOTPSeparatorProps) => (\n \n {children ?? }\n \n);\n\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP };\n", "type": "registry:ui" } ], "type": "registry:ui" }