InputOTPSlot() — ui Function Reference
Architecture documentation for the InputOTPSlot() function in input-otp.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 370e049e_59d6_83a0_1149_c5ca44380028["InputOTPSlot()"] 396ef7e0_0436_504a_8e5c_651e1fd75bc8["input-otp.tsx"] 370e049e_59d6_83a0_1149_c5ca44380028 -->|defined in| 396ef7e0_0436_504a_8e5c_651e1fd75bc8 style 370e049e_59d6_83a0_1149_c5ca44380028 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
deprecated/www/registry/new-york/ui/input-otp.tsx lines 36–58
>(({ index, className, ...props }, ref) => {
const inputOTPContext = React.useContext(OTPInputContext)
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]
return (
<div
ref={ref}
className={cn(
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
isActive && "z-10 ring-1 ring-ring",
className
)}
{...props}
>
{char}
{hasFakeCaret && (
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
<div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
</div>
)}
</div>
)
})
Domain
Subdomains
Source
Frequently Asked Questions
What does InputOTPSlot() do?
InputOTPSlot() is a function in the ui codebase, defined in deprecated/www/registry/new-york/ui/input-otp.tsx.
Where is InputOTPSlot() defined?
InputOTPSlot() is defined in deprecated/www/registry/new-york/ui/input-otp.tsx at line 36.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free