@reach/portal
TypeScript icon, indicating that this package has built-in type declarations

0.18.0 • Public • Published

@reach/portal

Stable release MIT license

Docs | Source

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 "@reach/portal";

function Example() {
	return (
		<Portal>
			<div>Stuff goes here</div>
		</Portal>
	);
}

/@reach/portal/

    Package Sidebar

    Install

    npm i @reach/portal

    Weekly Downloads

    560,189

    Version

    0.18.0

    License

    MIT

    Unpacked Size

    20.7 kB

    Total Files

    10

    Last publish

    Collaborators

    • ryanflorence
    • mjackson
    • chancestrickland
    • blainekasten