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

import { Portal } from '@contentful/f36-utils';

Example

Basic usage

Props (API reference)

Open in Storybook

Name

Type

Default

children
required

container
Document
HTMLElement

Container element for Portal

Help improve this page