OTPInput
This documentation provides a comprehensive reference for the OTPInput component, guiding you through its configuration options.
Screenshot #

Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| ContainerCssClass | string | null | Gets or sets the CSS class for the container element. | 1.0.0 | |
| ContainerCssStyle | string | null | Gets or sets the CSS style for the container element. | 1.0.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| Length | int | 6 | Gets or sets the OTP input length. | 1.0.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 |
Methods #
| Name | Return type | Description | Added Version |
|---|---|---|---|
| ClearAsync() | Task | Clears the OTP input fields. | 1.0.0 |
Events #
| Name | Return Type | Description | Added Version |
|---|---|---|---|
| OnOTPChanged | EventCallback<string> | This event fires when the OTP input value changes. | 1.0.0 |
| OnOTPCompleted | EventCallback<string> | This event fires when the OTP input is completed. | 1.0.0 |