Skip to content

Portal Component #1024

Description

@T-Hugs

Description

React portals will be important for rendering components like Dialog and SelectMenu at the root of the DOM hierarchy. We should implement a Portal component that makes it easy to render into a React portal and offers flexibility in the approach.

Design

N/A. Portals inherently have no visual elements.

Component API

Portals should work out of the box with no attributes, e.g. <Portal>Some portaled content</Portal>.

Additional configuration should be available for customizing the portal root or managing multiple portal roots.

Usage

The main use case for Portal is to be able to render UI on top of other UI (this is known by several terms, including overlays, popovers, dialogs, floating elements). In order to guarantee that overlaid content always covers up other content, it should be rendered at the root of the DOM after all siblings (or with a higher Z-index than the rest of its siblings).

This component will be used in conjunction with other behaviors to implement components such as Dialog and SelectMenu.

Implementation

See the Pull Request, #1025!

Timeline

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions