Skip to contentSkip to content

OTPFieldSeparator API

API reference docs for the React OTPFieldSeparator component. Learn about the props, CSS, and other APIs of this exported module.

Demos

Import

import OTPFieldSeparator from '@mui/material/OTPFieldSeparator';
// or
import { OTPFieldSeparator } from '@mui/material';

Learn about the difference by reading this guide on minimizing bundle size.



A decorative separator between OTPField inputs.

Props

Props of the native component are also available.

NameTypeDefaultDescription
aria-hidden'false'
| 'true'
| bool
true

Hide the separator from assistive technology.

childrennode'-'

The content displayed between character inputs.

classNamefunc
| string
-

CSS class applied to the element, or a function that returns a class based on the component's state.

orientation'horizontal'
| 'vertical'
'vertical'

The orientation of the separator.

renderelement
| func
-

Allows you to replace the component's HTML element with a different tag, or compose it with another component.
Accepts a ReactElement or a function that returns the element to render.

stylefunc
| object
-

Style applied to the element, or a function that returns a style object based on the component's state.

sxArray<func
| object
| bool>
| func
| object
-

System styles for this decorative separator.

See the `sx` page for more details.

The component cannot hold a ref.

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.