{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "otp-with-seperator", "type": "registry:component", "title": "OTP with Seperator", "description": "A component for inputting OTP codes with a custom separator", "registryDependencies": [ "input-otp", "label" ], "files": [ { "path": "registry/default/components/input/otp-with-seperator.tsx", "content": "import {\r\n InputOTP,\r\n InputOTPGroup,\r\n InputOTPSeparator,\r\n InputOTPSlot,\r\n} from '@/registry/default/ui/input-otp'\r\nimport { Label } from '@/registry/default/ui/label'\r\n\r\n// Change the inputLength to the desired number of slots\r\nconst inputLength = [3, 3]\r\nconst sum = () => inputLength.reduce((a, b) => a + b, 0)\r\n\r\nexport default function OtpWithSeperator() {\r\n return (\r\n
\r\n \r\n\r\n \r\n \r\n {Array.from({ length: inputLength[0] }, (_, index) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n {Array.from({ length: inputLength[1] }, (_, index) => (\r\n \r\n ))}\r\n \r\n \r\n\r\n

\r\n Built with{' '}\r\n \r\n input-otp\r\n {' '}\r\n

\r\n
\r\n )\r\n}\r\n", "type": "registry:component", "target": "components/otp-with-seperator.tsx" } ] }