OTP Input
A one-time password (OTP) input component that renders individual input fields for each digit. Useful for verification codes, two-factor authentication, and similar workflows.
Installation
npm install @duskmoon-dev/el-otp-input
Usage
import { register } from '@duskmoon-dev/el-otp-input';
register();
<el-dm-otp-input length="6" color="primary"></el-dm-otp-input>
Live Demo
Default (6 digits)
4 Digits
Colors
Disabled
Properties
| Property | Type | Default | Description |
|---|---|---|---|
length | number | 6 | Number of digit fields |
color | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'error' | 'primary' | Color theme |
disabled | boolean | false | Disable all fields |