{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "otp-input-demo",
  "title": "OTP Input Demo",
  "description": "A worked example of OTP Input: A one time code, one box per character, where pasting the whole code into any box fills the rest.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/otp-input.json"
  ],
  "files": [
    {
      "path": "components/demos/otp-input-demo.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { OtpInput } from \"@/registry/default/otp-input/otp-input\"\n\nexport function OtpInputDemo() {\n  const [code, setCode] = React.useState(\"\")\n\n  return (\n    <div className=\"grid w-full max-w-md justify-items-center gap-4\">\n      <p className=\"text-muted-foreground text-sm\">\n        We sent a code to your phone.\n      </p>\n\n      <OtpInput value={code} onChange={setCode} />\n\n      <p className=\"text-muted-foreground text-xs\" role=\"status\">\n        {code.length === 6 ? \"Checking the code\" : `${code.length} of 6`}\n      </p>\n    </div>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}