New to Kendo UI for AngularStart a free 30-day trial

Represents the Kendo UI OTP Input component for Angular.

Use the OTP Input to enter one-time passwords or verification codes.

Definition

Package:@progress/kendo-angular-inputs

Selector:kendo-otpinput

Export Name:Accessible in templates as #kendoOTPInputInstance="kendoOTPInput"

Syntax:

html
<kendo-otpinput type="number" [(ngModel)]="otpValue"></kendo-otpinput>

Inputs

disabled

boolean

When true, disables the OTPInput.

Default:

false

Sets the background and border styles of the OTP Input. The default value is set by the Kendo theme.

groupLength

number | number[]

Sets the length of the groups. If you set a number, all groups have the same length. If you set an array, each group can have a different length.

inputAttributes

{ [key: string]: string }

Sets the HTML attributes of the inner input element. You cannot change attributes that are required for the component to work.

length

number

Sets the total number of input fields.

Default:

4

Sets the placeholder for the input fields.

readonly

boolean

When true, sets the OTPInput to read-only mode.

Default:

false

Sets the border radius of the OTP Input. The default value is set by the Kendo theme.

Sets the separator between groups of input fields. You can use this only when groupLength is set.

Sets the padding of the input fields. The default value is set by the Kendo theme.

spacing

boolean

Sets whether the input fields are separate or adjacent.

Default:

true

Sets the input type.

Default:

'text'

value

string

Sets the value of the component. Unfilled input fields are represented with а space.

Events

Fires when the user blurs the OTP Input.

Fires when the user focuses the OTP Input.

Fires when the user changes the value.

This event does not fire when you change the value programmatically or through form bindings.

Methods

Blurs the OTP Input.

Focuses the OTP Input at the specified index provided as an argument.

Parameters:index?number

The index of the input to focus.