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 '@base_ui/react/legacy/Portal';| 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.