Skip to content
+

Focus Trap

The Focus Trap component prevents the user's focus from escaping its children components.

FocusTrap API

Import

import { FocusTrap } from '@mui/base/FocusTrap';
// or
import { FocusTrap } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props

openRequired

children

disableAutoFocus

disableEnforceFocus

disableRestoreFocus

getTabbable

isEnabled


The component cannot hold a ref.