OTPFieldInput API
API reference docs for the React OTPFieldInput component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import OTPFieldInput from '@mui/material/OTPFieldInput';
// or
import { OTPFieldInput } from '@mui/material';Learn about the difference by reading this guide on minimizing bundle size.
A single character in an OTPField.
Props of the native component are also available.
| Name | Type | Description |
|---|---|---|
| className | func | string | CSS class applied to the element, or a function that returns a class based on the component's state. |
| render | element | func | Allows you to replace the component's HTML element with a different tag, or compose it with another component. |
| style | func | object | Style applied to the element, or a function that returns a style object based on the component's state. |
| sx | Array<func | object | bool> | func | object | System styles for this character input. See the `sx` page for more details. |
Source code
If you did not find the information in this page, consider having a look at the implementation of the component for more detail.