skills/daisyui/components/otp.md
OTP (One-Time Password) component for inputting verification codes. It's usually 4 to 6 digits long and is used for two-factor authentication (2FA) or passwordless login.
otpotp-xs, otp-sm, otp-md, otp-lg, otp-xlotp-joinedotp-neutral, otp-primary, otp-secondary, otp-accent, otp-info, otp-success, otp-warning, otp-error<label class="otp {MODIFIER}">
<span></span>
<span></span>
<span></span>
<span></span>
<input type="text" autocomplete="one-time-code" inputmode="numeric" maxlength="4" pattern="[0-9]{4}" required />
</label>
otp-joined modifier connects the character boxes togetherotp class is for a label. The label should have 4 to 6 empty <span> elements for the visual representation of each digit and an input field for entering the code<span> elements must match the maxlength attribute and the pattern in the input field. For example, if you have 6 <span> elements, the input should have maxlength="6" and pattern="\d{6}"autocomplete="one-time-code" and inputmode="numeric" are important for mobile devices to show the appropriate keyboard and to allow autofill of the OTP code