Installation
templui add inputotp
Load the script once in your layout:
<head>
@inputotp.Script()
</head>
Examples
Placeholder
-
With Label
Custom Length
Password Type
-
Custom Styling
-
Form
-
Enter the 6-digit code sent to your phone
Invalid verification code.
API Reference
Required parameter
Hover for description
InputOTP
Main container for the OTP input component.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| | |
Group
Container for grouping OTP slots together.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
Slot
Individual input slot for a single character.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
Separator
Visual separator between groups of slots.
| Name | Type | Default |
|---|---|---|
| | |
| | |
| | |