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

input-otp-example.tsx — ui Source File

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

File tsx ComponentRegistry ChartRegistry 8 imports 9 functions

Entity Profile

Dependency Diagram

graph LR
  4aa10f6b_4776_aa23_5fe8_83405d831575["input-otp-example.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  46c758ca_dd64_66c4_37b9_b30acc3c853c["input-otp"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> 46c758ca_dd64_66c4_37b9_b30acc3c853c
  da02b53a_0c1d_d1a1_af31_74d99f1cdd7a["example"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> da02b53a_0c1d_d1a1_af31_74d99f1cdd7a
  381135fe_5f7a_910a_b8a2_691e9756a016["button"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> 381135fe_5f7a_910a_b8a2_691e9756a016
  11818bc0_4ad2_fa77_9175_f5c44c22af5e["card"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> 11818bc0_4ad2_fa77_9175_f5c44c22af5e
  e2659e08_4bcd_4a08_ab57_ce3a18c3b284["field"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> e2659e08_4bcd_4a08_ab57_ce3a18c3b284
  b097f84c_b418_fde4_f532_c3596e62999c["input-otp"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> b097f84c_b418_fde4_f532_c3596e62999c
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  4aa10f6b_4776_aa23_5fe8_83405d831575 --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style 4aa10f6b_4776_aa23_5fe8_83405d831575 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp"

import {
  Example,
  ExampleWrapper,
} from "@/registry/bases/radix/components/example"
import { Button } from "@/registry/bases/radix/ui/button"
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/registry/bases/radix/ui/card"
import {
  Field,
  FieldDescription,
  FieldError,
  FieldLabel,
} from "@/registry/bases/radix/ui/field"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSeparator,
  InputOTPSlot,
} from "@/registry/bases/radix/ui/input-otp"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"

export default function InputOTPExample() {
  return (
    <ExampleWrapper>
      <InputOTPForm />
      <InputOTPSimple />
      <InputOTPPattern />
      <InputOTPWithSeparator />
      <InputOTPAlphanumeric />
      <InputOTPDisabled />
      <InputOTPFourDigits />
      <InputOTPInvalid />
    </ExampleWrapper>
  )
}

function InputOTPSimple() {
  return (
    <Example title="Simple">
      <Field>
        <FieldLabel htmlFor="simple">Simple</FieldLabel>
        <InputOTP id="simple" maxLength={6}>
          <InputOTPGroup>
            <InputOTPSlot index={0} />
            <InputOTPSlot index={1} />
            <InputOTPSlot index={2} />
          </InputOTPGroup>
          <InputOTPSeparator />
          <InputOTPGroup>
// ... (233 more lines)

Subdomains

Dependencies

  • button
  • card
  • example
  • field
  • icon-placeholder
  • input-otp
  • input-otp
  • react

Frequently Asked Questions

What does input-otp-example.tsx do?
input-otp-example.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in input-otp-example.tsx?
input-otp-example.tsx defines 9 function(s): InputOTPAlphanumeric, InputOTPDisabled, InputOTPExample, InputOTPForm, InputOTPFourDigits, InputOTPInvalid, InputOTPPattern, InputOTPSimple, InputOTPWithSeparator.
What does input-otp-example.tsx depend on?
input-otp-example.tsx imports 8 module(s): button, card, example, field, icon-placeholder, input-otp, input-otp, react.
Where is input-otp-example.tsx in the architecture?
input-otp-example.tsx is located at apps/v4/registry/bases/radix/examples/input-otp-example.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/bases/radix/examples).

Analyze Your Own Codebase

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

Try Supermodel Free