Home / File/ otp-02.json — ui Source File

otp-02.json — ui Source File

Architecture documentation for otp-02.json, a json file in the ui codebase.

Entity Profile

Source Code

{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "otp-02",
  "title": "OTP 02",
  "description": "A two column OTP page with a cover image.",
  "registryDependencies": [
    "button",
    "input-otp",
    "label",
    "field"
  ],
  "files": [
    {
      "path": "registry/base-mira/blocks/otp-02/page.tsx",
      "content": "import { OTPForm } from \"@/registry/base-mira/blocks/otp-02/components/otp-form\"\n\nexport default function OTPPage() {\n  return (\n    <div className=\"flex min-h-svh w-full\">\n      <div className=\"flex w-full items-center justify-center p-6 lg:w-1/2\">\n        <div className=\"w-full max-w-xs\">\n          <OTPForm />\n        </div>\n      </div>\n      <div className=\"relative hidden w-1/2 lg:block\">\n        <img\n          alt=\"Authentication\"\n          className=\"absolute inset-0 h-full w-full object-cover\"\n          height={1080}\n          src=\"/placeholder.svg\"\n          width={1920}\n        />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/otp/page.tsx"
    },
    {
      "path": "registry/base-mira/blocks/otp-02/components/otp-form.tsx",
      "content": "import { cn } from \"@/registry/base-mira/lib/utils\"\nimport { Button } from \"@/registry/base-mira/ui/button\"\nimport {\n  Field,\n  FieldDescription,\n  FieldGroup,\n  FieldLabel,\n} from \"@/registry/base-mira/ui/field\"\nimport {\n  InputOTP,\n  InputOTPGroup,\n  InputOTPSeparator,\n  InputOTPSlot,\n} from \"@/registry/base-mira/ui/input-otp\"\n\nexport function OTPForm({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div className={cn(\"flex flex-col gap-6\", className)} {...props}>\n      <form>\n        <FieldGroup>\n          <div className=\"flex flex-col items-center gap-1 text-center\">\n            <h1 className=\"text-2xl font-bold\">Enter verification code</h1>\n            <p className=\"text-muted-foreground text-sm text-balance\">\n              We sent a 6-digit code to your email.\n            </p>\n          </div>\n          <Field>\n            <FieldLabel htmlFor=\"otp\" className=\"sr-only\">\n              Verification code\n            </FieldLabel>\n            <InputOTP maxLength={6} id=\"otp\" required>\n              <InputOTPGroup className=\"gap-2 *:data-[slot=input-otp-slot]:rounded-md *:data-[slot=input-otp-slot]:border\">\n                <InputOTPSlot index={0} />\n                <InputOTPSlot index={1} />\n              </InputOTPGroup>\n              <InputOTPSeparator />\n              <InputOTPGroup className=\"gap-2 *:data-[slot=input-otp-slot]:rounded-md *:data-[slot=input-otp-slot]:border\">\n                <InputOTPSlot index={2} />\n                <InputOTPSlot index={3} />\n              </InputOTPGroup>\n              <InputOTPSeparator />\n              <InputOTPGroup className=\"gap-2 *:data-[slot=input-otp-slot]:rounded-md *:data-[slot=input-otp-slot]:border\">\n                <InputOTPSlot index={4} />\n                <InputOTPSlot index={5} />\n              </InputOTPGroup>\n            </InputOTP>\n            <FieldDescription className=\"text-center\">\n              Enter the 6-digit code sent to your email.\n            </FieldDescription>\n          </Field>\n          <Button type=\"submit\">Verify</Button>\n          <FieldDescription className=\"text-center\">\n            Didn&apos;t receive the code? <a href=\"#\">Resend</a>\n          </FieldDescription>\n        </FieldGroup>\n      </form>\n    </div>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "authentication",
    "otp"
  ],
  "type": "registry:block"
}

Frequently Asked Questions

What does otp-02.json do?
otp-02.json is a source file in the ui codebase, written in json.
Where is otp-02.json in the architecture?
otp-02.json is located at apps/v4/public/r/styles/base-mira/otp-02.json (directory: apps/v4/public/r/styles/base-mira).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free