InputOTPControlled() — ui Function Reference
Architecture documentation for the InputOTPControlled() function in input-otp-controlled.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD c8734636_bd93_4271_53fc_488e5778c69e["InputOTPControlled()"] 4c571a7c_2989_a03c_bc19_e10abafb13cb["input-otp-controlled.tsx"] c8734636_bd93_4271_53fc_488e5778c69e -->|defined in| 4c571a7c_2989_a03c_bc19_e10abafb13cb style c8734636_bd93_4271_53fc_488e5778c69e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/registry/new-york/examples/input-otp-controlled.tsx lines 11–39
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>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does InputOTPControlled() do?
InputOTPControlled() is a function in the ui codebase, defined in deprecated/www/registry/new-york/examples/input-otp-controlled.tsx.
Where is InputOTPControlled() defined?
InputOTPControlled() is defined in deprecated/www/registry/new-york/examples/input-otp-controlled.tsx at line 11.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free