# @reach/portal

> Declarative portals for React

Latest version **0.18.0** (published 2022-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @reach/portal
pnpm add @reach/portal
yarn add @reach/portal
bun add @reach/portal
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.18.0 |
| Published | 2022-10-13 |
| First published | 2018-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5968 |
| Author | React Training |
| Maintainers | ryanflorence, mjackson, chancestrickland, blainekasten |

## Links

- npm: https://www.npmjs.com/package/@reach/portal
- Repository: https://github.com/reach/reach-ui
- Homepage: https://github.com/reach/reach-ui#readme
- Issues: https://github.com/reach/reach-ui/issues
- npm.io page: https://npm.io/package/@reach/portal

## Dependencies (1)

- [@reach/utils](https://npm.io/package/@reach/utils.md) 0.18.0

## Recent versions

- 0.18.0 (latest) — 2022-10-13
- 0.18.0-pre.5 (pre) — 2022-10-12
- 0.4.0-beta.0 (next) — 2019-10-11
- 0.18.0-pre.4 — 2022-10-12
- 0.18.0-pre.3 — 2022-10-11
- 0.18.0-pre.2 — 2022-10-11
- 0.18.0-pre.1 — 2022-10-11
- 0.18.0-pre.0 — 2022-10-11
- 0.17.0 — 2022-04-20
- 0.16.2 — 2021-10-17
- 0.16.0 — 2021-08-02
- 0.15.3 — 2021-07-10
- 0.15.2 — 2021-06-28
- 0.15.0 — 2021-04-07
- 0.14.0 — 2021-03-28
- … 38 more at https://npm.io/package/@reach/portal/versions

## README

# @reach/portal

[![Stable release](https://img.shields.io/npm/v/@reach/portal.svg)](https://npm.im/@reach/portal) ![MIT license](https://badgen.now.sh/badge/license/MIT)

[Docs](https://reach.tech/portal) | [Source](https://github.com/reach/reach-ui/tree/main/packages/portal)

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).

```jsx
import { Portal } from "@reach/portal";

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

---
_Source: https://npm.io/package/@reach/portal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
