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

OTP Input Appearance

The Kendo UI for Angular OTP Input provides predefined appearance options such as different sizes, border radiuses, and fill modes. The component also offers options for modifying its length and defining a spacing between the input fields.

The following example demonstrates all available appearance options of the OTP Input in action.

Change Theme
Theme
Loading ...

Length

By default, the OTP Input component displays four input fields. You have the ability to adjust the length of the OTP Input and define the total number of input fields in the component.

To customize the number of input fields in the OTP Input, use the length property that the component provides.

Change Theme
Theme
Loading ...

Spacing

By default, the input fields in the OTP Input component are rendered separate from each other. The OTP Input provides a spacing property that enables you to customize this behavior and display the input fields adjacent to each other.

To remove the default spacing between the input fields in the OTP Input, set the spacing property to false.

Change Theme
Theme
Loading ...

Size

The OTP Input allows you to set different padding on the input fields. To achieve this, utilize the size property. It accepts values of type InputSize or none.

The size option supports the following values:

  • small—Sets the top and bottom padding of the input fields to 2px.
  • medium (default)—Sets the top and bottom padding of the input fields to 4px.
  • large—Sets the top and bottom padding of the input fields to 8px.
  • none—The none option removes the built-in sizing of the OTP Input. Allows for custom padding.

The following example demonstrates how to define the size of the OTP Input.

Change Theme
Theme
Loading ...

Roundness

The OTP Input enables you to apply different border radius to the component through the rounded property. It accepts values of type InputRounded or none.

The rounded option supports the following values:

  • small—Sets the border radius of the input fields to 2px.
  • medium (default)—Sets the border radius of the input fields to 4px.
  • large—Sets the border radius of the input fields to 6px.
  • full—Sets the border radius of the input fields to 9999px.
  • none—The none option removes the built-in roundness of the OTP Input. Allows for custom border radius.

When the spacing of the OTP Input is disabled, the rounded option affects the border radius only of the outer input fields.

The following example demonstrates how to define the border radius of the OTP Input.

Change Theme
Theme
Loading ...

Fill Mode

The OTP Input allows you to set different fill modes by using the fillMode property. It accepts values of type InputFillMode or none.

The fillMode option supports the following values:

  • flat—Sets a transparent background and solid bottom border.
  • solid (default)—Applies a background color and solid borders.
  • outline—Sets a transparent background and solid borders.
  • none—The none option removes the built-in fill mode styles of the OTP Input. Allows for custom background and border styles.

The following example demonstrates how to define the fill mode of the OTP Input.

Change Theme
Theme
Loading ...
In this article
LengthSpacingSizeRoundnessFill ModeSuggested Links
Not finding the help you need?
Contact Support