InputOtp
One-time code entry with grouped slots, paste support and completion feedback.
Installation
Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.
Copy an example into your project with the shadcn CLI: npx shadcn@latest add https://design.gaudi.site/r/input-otp-code-formats.json.
Usage
Examples
Code formats
API
10 props
Accessibility
The underlying input supports keyboard entry and paste. Label the complete code field and announce validation beside it.
Related
FieldField composes form label, description, error, and input building blocks.7 examplesCalendarDate selection for single dates, ranges, bookings and localized calendars.11 examplesCascaderSelect items from hierarchical data using drill-down, columns, search and multiple selection.12 examplesColorPickerAn inline color canvas with hue, opacity, an eyedropper, and HEX/RGB/HSL/CSS editors.FileUploadChoose or drop attachments with validation, upload progress and recovery actions.5 examplesNumberFieldNumeric entry with increment buttons, bounds, locale formatting and scrubbing.2 examples