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

    children(required)

  • Name

    container

    Description

    Container element for Portal

    Document
    HTMLElement

Help improve this page