Launch sale — 60% off Pro
Contact
Input OTPVariants

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Input OTP - Masked OTP Input

A React OTP input with blur-sm masking and Eye/EyeOff toggle button for showing or hiding sensitive codes built with shadcn/ui InputOTP

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


Public spaces require code privacy during entry. This React pattern shows InputOTP with blur-sm and select-none masking code visibility, plus Eye/EyeOff toggle button switching between hidden and visible states—protects from shoulder surfing. Built with shadcn/ui InputOTP, Button, and Lucide React icons with absolute positioning, it's perfect for sensitive verification, public computer use, shared device authentication, banking codes, or any OTP entry where privacy matters and revealing codes temporarily helps accuracy without permanent exposure.

Toggle visibility to show/hide the entered code.

Pattern created by @haydenbleasel

Installation

Questions you might have