OTPInput

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

Screenshot #

Blazor OTPInput Component

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. 4.0.0
ContainerCssStyle string? null Gets or sets the CSS style for the container element. 4.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. 4.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. 4.0.0

Events #

Name Return Type Description Added Version
OnOTPChanged EventCallback<string> This event fires when the OTP input value changes. 4.0.0
OnOTPCompleted EventCallback<string> This event fires when the OTP input is completed. 4.0.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.