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

input-otp-controlled.tsx — ui Source File

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

File tsx DocumentationAtlas SearchAPI 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  a038d787_be7d_7228_e7f7_fd47f99f1b5e["input-otp-controlled.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  a038d787_be7d_7228_e7f7_fd47f99f1b5e --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  0b8d5055_3927_87e7_3c2f_dac1727e0600["input-otp"]
  a038d787_be7d_7228_e7f7_fd47f99f1b5e --> 0b8d5055_3927_87e7_3c2f_dac1727e0600
  style a038d787_be7d_7228_e7f7_fd47f99f1b5e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSlot,
} from "@/examples/base/ui/input-otp"

export default function InputOTPControlled() {
  const [value, setValue] = React.useState("")

  return (
    <div className="space-y-2">
      <InputOTP
        maxLength={6}
        value={value}
        onChange={(value) => setValue(value)}
      >
        <InputOTPGroup>
          <InputOTPSlot index={0} />
          <InputOTPSlot index={1} />
          <InputOTPSlot index={2} />
          <InputOTPSlot index={3} />
          <InputOTPSlot index={4} />
          <InputOTPSlot index={5} />
        </InputOTPGroup>
      </InputOTP>
      <div className="text-center text-sm">
        {value === "" ? (
          <>Enter your one-time password.</>
        ) : (
          <>You entered: {value}</>
        )}
      </div>
    </div>
  )
}

Subdomains

Dependencies

  • input-otp
  • react

Frequently Asked Questions

What does input-otp-controlled.tsx do?
input-otp-controlled.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-controlled.tsx?
input-otp-controlled.tsx defines 1 function(s): InputOTPControlled.
What does input-otp-controlled.tsx depend on?
input-otp-controlled.tsx imports 2 module(s): input-otp, react.
Where is input-otp-controlled.tsx in the architecture?
input-otp-controlled.tsx is located at apps/v4/examples/base/input-otp-controlled.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/examples/base).

Analyze Your Own Codebase

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

Try Supermodel Free