Import
import { Portal } from '@contentful/f36-utils';
Example
Basic usage
Props (API reference)
Open in StorybookName | Type | Default |
---|---|---|
children required | ||
container | Document HTMLElement Container element for Portal |
Portal
component can be used to render children in a DOM node outside of its parent component. It can be useful for rendering components that you don’t want to be clipped by their parent’s component. For example: modals, popovers, dropdown, etc.
import { Portal } from '@contentful/f36-utils';
Name | Type | Default |
---|---|---|
children required | ||
container | Document HTMLElement Container element for Portal |