Components•Input OTP
Components•Input OTP
Input OTP
A segmented one-time-code input for short verification flows.
Dependencies
input-otp
Copy below cli
npx shadcn add @bjork-ui/primitive-input-otpHow to use
import { BjorkInputOTP } from "@/components/bjork-ui/primitives";Props
classNamestringPass through styling hooks for the Input OTP primitive without replacing the base Bjork surface.
childrenReactNodeComposable content, labels, icons, and nested content where the primitive supports them.
variant"default" | "quiet" | "inset" | "ghost"Match the OTP slot surface to the same visual variants used by Bjork inputs.
2
8
4
9
1
5
Default OTP
Use for the standard raised Bjork field surface.
<BjorkInputOTP variant="default" />2
8
4
9
1
5
Inset OTP
Use where the slots should feel recessed into the surrounding surface.
<BjorkInputOTP variant="inset" />2
8
4
9
1
5
Ghost OTP
Use only when the layout already provides enough framing.
<BjorkInputOTP variant="ghost" />