BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/boldkit/input-otp

Input OTP

boldkit/input-otp
FreeComponent

One-time password input with neubrutalism styling

Live preview

live · rendered by the registry
Rendered by boldkit on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://boldkit.dev/r/input-otp.json

Source

registry/default/ui/input-otp.tsxboldkit.dev/r/input-otp.json
1import * as React from 'react'
2import { OTPInput, OTPInputContext } from 'input-otp'
3import { Dot } from 'lucide-react'
4import { cn } from '@/lib/utils'
5
6const InputOTP = React.forwardRef<
7 React.ElementRef<typeof OTPInput>,
8 React.ComponentPropsWithoutRef<typeof OTPInput>
9>(({ className, containerClassName, ...props }, ref) => (
10 <OTPInput
11 ref={ref}
12 containerClassName={cn(
13 'flex items-center gap-2 has-[:disabled]:opacity-50',
14 containerClassName
15 )}
16 className={cn('disabled:cursor-not-allowed', className)}
17 {...props}
18 />
19))
20InputOTP.displayName = 'InputOTP'
21
22const InputOTPGroup = React.forwardRef<
23 React.ElementRef<'div'>,
24 React.ComponentPropsWithoutRef<'div'>
25>(({ className, ...props }, ref) => (
26 <div ref={ref} className={cn('flex items-center', className)} {...props} />
27))
28InputOTPGroup.displayName = 'InputOTPGroup'
29
30const InputOTPSlot = React.forwardRef<
31 React.ElementRef<'div'>,
32 React.ComponentPropsWithoutRef<'div'> & { index: number }
33>(({ index, className, ...props }, ref) => {
34 const inputOTPContext = React.useContext(OTPInputContext)
35 const slot = inputOTPContext.slots?.[index] ?? { char: null, hasFakeCaret: false, isActive: false }
36 const { char, hasFakeCaret, isActive } = slot
37
38 return (
39 <div
40 ref={ref}
41 className={cn(
42 'relative flex h-12 w-12 items-center justify-center border-3 border-foreground bg-background text-sm font-bold uppercase shadow-[4px_4px_0px_hsl(var(--shadow-color))] transition duration-200',
43 isActive && 'z-10 ring-2 ring-ring ring-offset-background translate-x-[4px] translate-y-[4px] shadow-none',
44 className
45 )}
46 {...props}
47 >
48 {char}
49 {hasFakeCaret && (
50 <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
51 <div className="h-6 w-px animate-caret-blink bg-foreground duration-1000" />
52 </div>
53 )}
54 </div>
55 )
56})
57InputOTPSlot.displayName = 'InputOTPSlot'
58
59const InputOTPSeparator = React.forwardRef<
60 React.ElementRef<'div'>,
61 React.ComponentPropsWithoutRef<'div'>
62>(({ ...props }, ref) => (
63 <div ref={ref} role="separator" {...props}>
64 <Dot className="h-4 w-4" />
65 </div>
66))
67InputOTPSeparator.displayName = 'InputOTPSeparator'
68
69export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }

What it pulls in

npm packages

  • input-otp
  • lucide-react

Other registry items

  • @boldkit/utils

Files it writes

  • registry/default/ui/input-otp.tsx

Facts

Registry
boldkit
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
today

Go to the source

Docs on boldkit boldkit.dev ANIBIT14/boldkit on GitHub Raw registry item This item as JSON

More from boldkit

All 94 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionboldkitComponentsFree2 deps
AlertalertboldkitComponentsFree2 deps
Alert Dialogalert-dialogboldkitComponentsFree1 dep
ASCII Shapesascii-shapesboldkitComponentsFreeno deps
Aspect Ratioaspect-ratioboldkitComponentsFree1 dep
AvataravatarboldkitComponentsFree1 dep
BadgebadgeboldkitComponentsFree1 dep
BreadcrumbbreadcrumbboldkitComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex