Home / File/ input-otp-form.tsx — ui Source File

input-otp-form.tsx — ui Source File

Architecture documentation for input-otp-form.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.

File tsx DocumentationAtlas SearchAPI 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae["input-otp-form.tsx"]
  4b1d2128_46d9_46f0_b915_b6e1925b7876["button"]
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae --> 4b1d2128_46d9_46f0_b915_b6e1925b7876
  a3f5dc6c_2f22_a06c_c4d4_d84a4ed2818e["card"]
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae --> a3f5dc6c_2f22_a06c_c4d4_d84a4ed2818e
  b5f68436_cf6b_fba3_fb29_abf27fd13442["field"]
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae --> b5f68436_cf6b_fba3_fb29_abf27fd13442
  a933c65c_9a12_8beb_8248_5ad742c1d84f["input-otp"]
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae --> a933c65c_9a12_8beb_8248_5ad742c1d84f
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  7ad7a96d_fa06_90bb_f36a_13f59db7f5ae --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style 7ad7a96d_fa06_90bb_f36a_13f59db7f5ae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { Button } from "@/examples/radix/ui/button"
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/examples/radix/ui/card"
import { Field, FieldDescription, FieldLabel } from "@/examples/radix/ui/field"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSeparator,
  InputOTPSlot,
} from "@/examples/radix/ui/input-otp"
import { RefreshCwIcon } from "lucide-react"

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

Functions

Dependencies

  • button
  • card
  • field
  • input-otp
  • lucide-react

Frequently Asked Questions

What does input-otp-form.tsx do?
input-otp-form.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in input-otp-form.tsx?
input-otp-form.tsx defines 1 function(s): InputOTPForm.
What does input-otp-form.tsx depend on?
input-otp-form.tsx imports 5 module(s): button, card, field, input-otp, lucide-react.
Where is input-otp-form.tsx in the architecture?
input-otp-form.tsx is located at apps/v4/examples/radix/input-otp-form.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/radix).

Analyze Your Own Codebase

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

Try Supermodel Free