Installation
Install the component
templui add inputotpAdd the JavaScript to your layout
@inputotp.Script()Call this template in your base layout file (e.g., in the <head> section).
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 |
|---|---|---|
| | |
| | |
| | |