Portal

View on GitHub

Introduction

The Portal component is a utility component to help with the ReactDOM.createPortal API. Learn more about portal on the official React docs

Portals are used throughout Evergreen in components such as Overlay and Positioner to provide a robust way of rendering outside of the current DOM tree.

Example

<Portal>
  <Pane background="red" padding={24} position="fixed" bottom={0}>
    <Text color="white">Look ma, I am in a portal!</Text>
  </Pane>
</Portal>
code Hide code

Portal Props

childrennoderequired