InputOTPSlot() — ui Function Reference
Architecture documentation for the InputOTPSlot() function in input-otp.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD de227f05_37a1_c25e_5e1d_ed3491475520["InputOTPSlot()"] cd6c0e65_3f70_9d11_6711_c2dcab987df6["input-otp.tsx"] de227f05_37a1_c25e_5e1d_ed3491475520 -->|defined in| cd6c0e65_3f70_9d11_6711_c2dcab987df6 style de227f05_37a1_c25e_5e1d_ed3491475520 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/radix/ui/input-otp.tsx lines 43–71
function InputOTPSlot({
index,
className,
...props
}: React.ComponentProps<"div"> & {
index: number
}) {
const inputOTPContext = React.useContext(OTPInputContext)
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}
return (
<div
data-slot="input-otp-slot"
data-active={isActive}
className={cn(
"cn-input-otp-slot relative flex items-center justify-center data-[active=true]:z-10",
className
)}
{...props}
>
{char}
{hasFakeCaret && (
<div className="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center">
<div className="cn-input-otp-caret-line" />
</div>
)}
</div>
)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does InputOTPSlot() do?
InputOTPSlot() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/ui/input-otp.tsx.
Where is InputOTPSlot() defined?
InputOTPSlot() is defined in apps/v4/registry/bases/radix/ui/input-otp.tsx at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free