--- title: OTPInputProps description: "Learn how to build custom functionality when working with the React Inputs by Kendo UI with the help of the OTPInputProps." api_reference: true type: inner_api slug: api_inputs_otpinputprops --- # OTPInputProps Represents the props for the KendoReact [OTPInput](https://www.telerik.com/kendo-react-ui/components/inputs/api/OTPInput) component.
| Name | Type | Default | Description |
|---|---|---|---|
| #### ariaDescribedBy? |
string
|
Sets the `aria-describedby` attribute on the OTPInput wrapper element. | |
| #### ariaLabel? |
string
|
Sets the `aria-label` attribute on the OTPInput wrapper element.
```tsx
|
|
| #### ariaLabelledBy? |
string
|
Sets the `aria-labelledby` attribute on the OTPInput wrapper element. | |
| #### defaultValue? |
string
|
Sets the initial value of the OTPInput (uncontrolled mode).
Once set, subsequent updates are managed internally.
```tsx
|
|
| #### disabled? |
boolean
|
false
|
When `true`, disables the OTPInput so that it cannot be interacted
with and receives the `k-disabled` CSS class.
```tsx
|
| #### fillMode? |
"flat" | "solid" | "outline"
|
Configures the `fillMode` of the component.
The available options are:
- `'solid'`
- `'flat'`
- `'outline'`
```tsx
|
|
| #### groupLength? |
number | number[]
|
Sets the length of each group of input cells.
- Provide a `number` to give all groups the same length.
- Provide a `number[]` to assign different lengths to each group.
The sum of all group lengths must equal `length`.
```tsx
// Two groups of 3: "XXX-XXX"
|
|
| #### id? |
string
|
Sets the `id` attribute on the OTPInput wrapper element.
```tsx
|
|
| #### inputAttributes? |
React.InputHTMLAttributes<HTMLInputElement>
|
Sets additional HTML attributes on every inner `` element.
Attributes that are required for the component to work correctly cannot be overridden.
```tsx
|
|
| #### length? |
number
|
4
|
Sets the total number of individual input cells.
```tsx
|
| #### name? |
string
|
Sets the `name` attribute used when the component participates in an HTML form. A hidden `` with this name and the current value is rendered for native form submission. ```tsx ``` | |
| #### onBlur? |
(event: [OTPInputBlurEvent]({% slug api_inputs_otpinputblurevent %})) => void
|
Fires when the entire OTPInput loses focus (not on every
inter-cell navigation).
```tsx
|
|
| #### onChange? |
(event: [OTPInputChangeEvent]({% slug api_inputs_otpinputchangeevent %})) => void
|
Fires when the user changes the value of any input cell.
```tsx
|
|
| #### onFocus? |
(event: [OTPInputFocusEvent]({% slug api_inputs_otpinputfocusevent %})) => void
|
Fires when any input cell receives focus.
```tsx
|
|
| #### placeholder? |
string
|
Sets a placeholder character shown in each empty input cell.
```tsx
|
|
| #### readOnly? |
boolean
|
false
|
When `true`, sets the OTPInput to read-only mode.
```tsx
|
| #### required? |
boolean
|
false
|
Marks the field as required for HTML5 constraint validation.
```tsx
|
| #### rounded? |
"small" | "none" | "medium" | "large" | "full"
|
Configures the `rounded` property of the component.
The available options are:
- `'small'`
- `'medium'`
- `'large'`
- `'full'`
- `'none'
```tsx
|
|
| #### separator? |
string | [OTPSeparatorIcon]({% slug api_inputs_otpseparatoricon %})
|
Sets the separator rendered between groups of input cells.
Only effective when `groupLength` is set.
- Provide a `string` to render a text separator.
- Provide an `OTPSeparatorIcon` to render an icon separator.
```tsx
// Text separator
|
|
| #### size? |
"small" | "medium" | "large"
|
Configures the `size` of the component.
The available options are:
- `'small'`
- `'medium'`
- `'large'`
```tsx
|
|
| #### spacing? |
boolean
|
true
|
When `true`, renders the input cells as separate boxes with spacing
between them. When `false`, renders them as adjacent (joined) cells.
```tsx
|
| #### type? |
[OTPInputType]({% slug api_inputs_otpinputtype %})
|
'text'
|
Sets the input type.
```tsx
|
| #### valid? |
boolean
|
When `false`, renders the component in an invalid visual state.
```tsx
|
|
| #### value? |
string
|
Sets the current value of the OTPInput (controlled mode).
Unfilled input cells are represented with a space (`' '`).
```tsx
|
|
| #### webMcp? |
boolean | WebMcpProps
|
Enables Web MCP tool registration for this component.
Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
Pass `true` for defaults or an object for fine-grained control.
When absent or `false`, zero webMcp overhead.
```tsx
// Boolean — use provider's dataName
|