Skip to content

Conversation

@Erij-Maherzia-BEN-BRAHIM

Motivation

The <InputOTP /> component currently renders each OTP character as plain text.
For security and UX reasons, many applications (banking apps, payment flows, login flows) require OTP digits to be masked, similar to password fields.

This PR introduces an optional masking feature that hides OTP characters visually.

Code Example (Usage)

Masked OTP (default bullet):

<InputOTP mask maxLength={6} />

Custom mask character (*):

<InputOTP mask maskChar="*" maxLength={6} />

Unmasked (current default behavior):

<InputOTP maxLength={6} />

Before & After

Before

1 2 3 4 5 6

After (mask enabled)

• • • • • •

@vercel
Copy link

vercel bot commented Nov 20, 2025

@Erij-Maherzia-BEN-BRAHIM is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant