Repository navigation
[blocks]: Add separated slot variant to InputOTP #10395
elcicneha
started this conversation in
Blocks Request
Replies: 1 comment 1 reply
|
This fits best as a variant on It’s a purely visual difference (shared vs independent borders), so A separate component would add unnecessary surface area for something that doesn’t change behavior just styling. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
The current
InputOTPSlotrenders slots that connect into a pill — they share borders and only the outermost corners are rounded. A common alternative is independent slots, where each one has its own full border, rounded corners, and a small gap between them.It's a fairly common pattern, would be nice to have it built into shadcn.
Live demo & docs
https://ui-registry-delta.vercel.app/docs/input-otp
What it looks like
This could be approached either way:
variant="separated"prop onInputOTPGroupthat switches fromshared edges to independent slots. Fully additive, no breaking changes.
InputOTPSeparated(or similar) that shipsas its own registry item alongside the existing one.
Happy to open a PR in whichever direction makes more sense
Example
https://ui-registry-delta.vercel.app/docs/input-otp
All reactions