Portal
The Portal component lets you render its children into a DOM node that exists outside of the Portal's own DOM hierarchy.
Portal API
Import
import { Portal } from '@mui/base/Portal';
// or
import { Portal } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.
Name | Type | Default | Description |
---|---|---|---|
children | node | - | The children to render into the |
container | HTML element | func | - | An HTML element or function that returns one. The |
disablePortal | bool | false | The |
The component cannot hold a ref.