Portal
A component that renders its children in a portal, preventing layout issues in complex UI structures.
Overview
The Portal component is a utility component that renders its children in a portal, preventing layout issues in complex UI structures. This component is used for the various Bits UI component that have a Portal
sub-component.
Usage
Default behavior
By default, the Portal
component will render its children in the body
element.
Custom target
You can use the to
prop to specify a custom target element or selector to render the content to.
Disable
You can use the disabled
prop to disable the portal behavior.