Balance Logo
Reckon Design System
Open playroom


A simple wrapper around react-dom's createPortal method.
pnpm add @balance-web/portal
Import usage
import {
} from '@balance-web/portal';
  • Code
  • API

Creates and appends a DOM node to the end of document.body and renders a React tree into it. Useful for rendering a natural React element hierarchy with a different DOM hierarchy to prevent parent styles from clipping or hiding content (for popovers, dropdowns, and modals).

import { Portal } from '@balance-web/portal';
Copyright © 2024 Reckon. Designed and developed in partnership with Thinkmill.
Bitbucket logoJira software logoConfluence logo