# @reach/popover

> Render a portal positioned relative to another element.

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

## Install

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

## 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 | 2019-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 47 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5966 |
| Author | React Training |
| Maintainers | ryanflorence, mjackson, chancestrickland, blainekasten |

## Links

- npm: https://www.npmjs.com/package/@reach/popover
- 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/popover

## Dependencies (5)

- [tabbable](https://npm.io/package/tabbable.md) ^5.3.3
- [@reach/rect](https://npm.io/package/@reach/rect.md) 0.18.0
- [@reach/utils](https://npm.io/package/@reach/utils.md) 0.18.0
- [@reach/portal](https://npm.io/package/@reach/portal.md) 0.18.0
- [@reach/polymorphic](https://npm.io/package/@reach/polymorphic.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-12
- 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
- … 37 more at https://npm.io/package/@reach/popover/versions

## README

# @reach/popover

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

```jsx
import * as React from "react";
import { Popover, positionDefault } from "@reach/popover";

function Example() {
	const ref = React.useRef(null);
	const [value, setValue] = React.useState("");
	return (
		<div>
			<label>
				<span>Type for a special message</span>
				<input
					type="text"
					ref={ref}
					onChange={(event) => setValue(event.target.value)}
				/>
			</label>

			{value.length > 0 && (
				<Popover targetRef={ref} position={positionDefault}>
					<div>
						<p>Whoa! Look at me!</p>
					</div>
				</Popover>
			)}
		</div>
	);
}
```

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