Portal API
API reference docs for the React Portal component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import Portal from '@mui/material/Portal';
// or
import { Portal } from '@mui/material';
Learn about the difference by reading this guide on minimizing bundle size.
Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.
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 |