Measured entry
shadcn-input-otp
A client-side React wrapper that renders segmented one-time-code entry with grouped slots, an active caret, and an optional separator. It ships as source copied from the shadcn registry and composes input-otp, a Lucide icon, Tailwind utilities, and the cn helper backed by clsx and tailwind-merge.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 1 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 34.0 KB (99.5 KB build, 65.5 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 665ms error during build: [vite]: Rollup failed to resolve import "lucide-react" from "<sandbox>re-8b6a2432a49e/src/cut/components/ui/input-otp.tsx".
Verdict
A practical, compact adapter for teams that already like the shadcn source-copy model. It builds and mounts cleanly across the tested layouts, but the supplied demo has a critical labeling failure, so add an explicit accessible name before shipping it.
Use it if
- You need a controlled verification-code field with individually styled slots.
- Your React interface already uses Tailwind utilities and can supply an accessible label.
- You want slot grouping and separators while retaining the input-otp interaction model.
Skip it if
- You want a plain text field without the extra dependency and segmented-slot behavior.
- Your project does not use React or cannot support client-side components.
- You need a drop-in example with an accessible name already wired, because the supplied demo leaves the form control unlabeled.
Install
| Declared dependencies | input-otp, clsx, tailwind-merge |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
In a non-shadcn project, add input-otp, lucide-react, clsx, and tailwind-merge; provide the cn helper, Tailwind theme tokens used by the classes, and the caret-blink animation. Mark the module for client rendering where your framework requires it, and connect a visible label or accessible name.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/shadcn-ui/uiAlternatives
Other published entries for the input pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- clay-inputclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.9KB
- Bare
- pass
- Prov
- NO
- neu-search-inputneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.1KB
- Bare
- pass
- Prov
- NO
- clay-search-inputclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.3KB
- Bare
- pass
- Prov
- NO
- originui-comp-33minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 20.7KB
- Bare
- pass
- Prov
- NO
- hextaui-labelminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 31.3KB
- Bare
- pass
- Prov
- NO
- ruixen-circular-stepper-inputliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 61.1KB
- Bare
- pass
- Prov
- NO