Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

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

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.

Masked OTP Input preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.