- components
- ›
- portal
- ›
- react
Portal
Renders children into a DOM node that exists outside the DOM hierarchy.
How It Works
When enabled, the content will move from the source to the target element.
API Reference
Root
Property | Default | Type |
---|---|---|
disabled | false | boolean | undefinedIf true, the portal functionality is disabled and children are rendered in place. |
target | document.body | HTMLElement | undefinedThe HTML element to which the portal content will be appended. |
children | - | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null |