Home / Function/ InputOTPForm() — ui Function Reference

InputOTPForm() — ui Function Reference

Architecture documentation for the InputOTPForm() function in input-otp-form.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  95491c4f_9dfc_4c17_c23d_1df77c41298e["InputOTPForm()"]
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae["input-otp-form.tsx"]
  95491c4f_9dfc_4c17_c23d_1df77c41298e -->|defined in| 7ad7a96d_fa06_90bb_f36a_13f59db7f5ae
  style 95491c4f_9dfc_4c17_c23d_1df77c41298e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/input-otp-form.tsx lines 19–76

export function InputOTPForm() {
  return (
    <Card className="mx-auto max-w-md">
      <CardHeader>
        <CardTitle>Verify your login</CardTitle>
        <CardDescription>
          Enter the verification code we sent to your email address:{" "}
          <span className="font-medium">m@example.com</span>.
        </CardDescription>
      </CardHeader>
      <CardContent>
        <Field>
          <div className="flex items-center justify-between">
            <FieldLabel htmlFor="otp-verification">
              Verification code
            </FieldLabel>
            <Button variant="outline" size="xs">
              <RefreshCwIcon />
              Resend Code
            </Button>
          </div>
          <InputOTP maxLength={6} id="otp-verification" required>
            <InputOTPGroup className="*:data-[slot=input-otp-slot]:h-12 *:data-[slot=input-otp-slot]:w-11 *:data-[slot=input-otp-slot]:text-xl">
              <InputOTPSlot index={0} />
              <InputOTPSlot index={1} />
              <InputOTPSlot index={2} />
            </InputOTPGroup>
            <InputOTPSeparator className="mx-2" />
            <InputOTPGroup className="*:data-[slot=input-otp-slot]:h-12 *:data-[slot=input-otp-slot]:w-11 *:data-[slot=input-otp-slot]:text-xl">
              <InputOTPSlot index={3} />
              <InputOTPSlot index={4} />
              <InputOTPSlot index={5} />
            </InputOTPGroup>
          </InputOTP>
          <FieldDescription>
            <a href="#">I no longer have access to this email address.</a>
          </FieldDescription>
        </Field>
      </CardContent>
      <CardFooter>
        <Field>
          <Button type="submit" className="w-full">
            Verify
          </Button>
          <div className="text-muted-foreground text-sm">
            Having trouble signing in?{" "}
            <a
              href="#"
              className="hover:text-primary underline underline-offset-4 transition-colors"
            >
              Contact support
            </a>
          </div>
        </Field>
      </CardFooter>
    </Card>
  )
}

Subdomains

Frequently Asked Questions

What does InputOTPForm() do?
InputOTPForm() is a function in the ui codebase, defined in apps/v4/examples/radix/input-otp-form.tsx.
Where is InputOTPForm() defined?
InputOTPForm() is defined in apps/v4/examples/radix/input-otp-form.tsx at line 19.

Analyze Your Own Codebase

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

Try Supermodel Free