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

OTPInputComponent

Selector

kendo-otpinput

Export Name

Accessible in templates as #kendoOTPInputInstance="kendoOTPInput"

Inputs

NameTypeDefaultDescription

disabled

boolean

false

Configures whether the component is enabled or disabled.

fillMode

InputFillMode

The fillMode property specifies the background and border styles of the OTP Input.

The possible values are:

  • flat
  • solid (default)
  • outline
  • none

groupLength

number | number[]

Configures the length of the groups. If groupLength is a number, all groups will have the same length. If it's an array, each group can have a different length.

inputAttributes

{[key: string]: string}

Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.

length

number

4

Configures the total number of input fields.

placeholder

string

Configures the placeholder of the input fields.

readonly

boolean

false

Configures whether the component is readonly.

rounded

InputRounded

The rounded property specifies the border radius of the OTP Input.

The possible values are:

  • small
  • medium (default)
  • large
  • full
  • none

separator

string | OTPSeparatorIcon

Specifies the separator between groups of input fields.

The configuration can only be applied when groupLength is set.

size

InputSize

The size property specifies the padding of the input fields.

The possible values are:

  • small
  • medium (default)
  • large
  • none

spacing

boolean

true

Configures whether the input fields are separate or adjacent to each other.

type

OTPInputType

'text'

Configures the input type.

  • The possible values are:
  • text (default)
  • number
  • password

value

string

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

Events

NameTypeDescription

blur

EventEmitter<any>

Fires each time the user blurs the OTP Input.

focus

EventEmitter<any>

Fires each time the user focuses the OTP Input.

valueChange

EventEmitter<any>

Fires each time the value is changed by the user— When the value of the component is programmatically changed to ngModel or formControl through its API or form binding, the valueChange event is not triggered because it might cause a mix-up with the built-in valueChange mechanisms of the ngModel or formControl bindings.

Methods

blur

Blurs the OTP Input.

focus

Focuses the OTP Input.

Parameters

index?

number

In this article
SelectorExport NameInputsEventsMethods
Not finding the help you need?
Contact Support