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 UIPrimitives 8 imports 9 functions

Entity Profile

Dependency Diagram

graph LR
  a8900f7f_60fe_355a_9ca4_06186586e61b["input-otp-example.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  46c758ca_dd64_66c4_37b9_b30acc3c853c["input-otp"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> 46c758ca_dd64_66c4_37b9_b30acc3c853c
  f56be340_a522_c6f7_dec3_5906873d14c8["example"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> f56be340_a522_c6f7_dec3_5906873d14c8
  7328fa0a_98b6_fe77_42fd_0d1582b24604["button"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> 7328fa0a_98b6_fe77_42fd_0d1582b24604
  deffd1e6_798d_b7fd_c687_7ccabc947893["card"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> deffd1e6_798d_b7fd_c687_7ccabc947893
  8a527dea_9425_3da4_8ceb_ec3058568dc9["field"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> 8a527dea_9425_3da4_8ceb_ec3058568dc9
  d51f2add_91d7_46e2_5575_3ec3ee42822c["input-otp"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> d51f2add_91d7_46e2_5575_3ec3ee42822c
  de6fac54_74ca_6c25_8f8b_d1ba3287dbf2["icon-placeholder"]
  a8900f7f_60fe_355a_9ca4_06186586e61b --> de6fac54_74ca_6c25_8f8b_d1ba3287dbf2
  style a8900f7f_60fe_355a_9ca4_06186586e61b 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/base/components/example"
import { Button } from "@/registry/bases/base/ui/button"
import {
  Card,
  CardContent,
  CardDescription,
  CardFooter,
  CardHeader,
  CardTitle,
} from "@/registry/bases/base/ui/card"
import {
  Field,
  FieldDescription,
  FieldError,
  FieldLabel,
} from "@/registry/bases/base/ui/field"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSeparator,
  InputOTPSlot,
} from "@/registry/bases/base/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, UIPrimitives 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/base/examples/input-otp-example.tsx (domain: ComponentRegistry, subdomain: UIPrimitives, directory: apps/v4/registry/bases/base/examples).

Analyze Your Own Codebase

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

Try Supermodel Free