# @react-lit/tooltip

> When the user's mouse or focus rests on an element, a non-interactive popup is displayed near it.

Latest version **0.7.0** (published 2023-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @react-lit/tooltip
pnpm add @react-lit/tooltip
yarn add @react-lit/tooltip
bun add @react-lit/tooltip
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2023-10-03 |
| First published | 2021-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 5 |
| Unpacked size | 31.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joel Voss |
| Maintainers | joelvoss |

## Links

- npm: https://www.npmjs.com/package/@react-lit/tooltip
- Repository: https://github.com/joelvoss/react-lit-tooltip
- Homepage: https://github.com/joelvoss/react-lit-tooltip#readme
- Issues: https://github.com/joelvoss/react-lit-tooltip/issues
- npm.io page: https://npm.io/package/@react-lit/tooltip

## Dependencies (5)

- [@react-lit/rect](https://npm.io/package/@react-lit/rect.md) ^0.7.0
- [@react-lit/helper](https://npm.io/package/@react-lit/helper.md) ^0.7.3
- [@react-lit/portal](https://npm.io/package/@react-lit/portal.md) ^0.7.0
- [@react-lit/auto-id](https://npm.io/package/@react-lit/auto-id.md) ^0.7.0
- [@react-lit/visually-hidden](https://npm.io/package/@react-lit/visually-hidden.md) ^0.4.4

## Recent versions

- 0.7.0 (latest) — 2023-10-03
- 0.6.0 — 2023-08-09
- 0.5.0 — 2022-09-10
- 0.4.0 — 2022-07-24
- 0.3.1 — 2022-04-22
- 0.3.0 — 2022-01-20
- 0.2.0 — 2022-01-17
- 0.1.2 — 2021-12-09
- 0.1.1 — 2021-12-01
- 0.1.0 — 2021-10-31

## README

# @react-lit/tooltip

When the user's mouse or focus rests on an element, a non-interactive popup is
displayed near it.

> **NOTE:** Touch events are currently not supported. There's not a lot of
> research or examples of these types of tooltips on mobile. Please adjust
> your interfaces on mobile to account for this.

## Installation

```bash
$ npm i @react-lit/tooltip
# or
$ yarn add @react-lit/tooltip
```

## Example

```js
import Tooltip, { useTooltip, TooltipPopup } from '@react-lit/tooltip';
import VisuallyHidden from '@react-lit/visually-hidden';

function Example() {
	return (
		<Tooltip label="Close">
			<button>
				<VisuallyHidden>Close</VisuallyHidden>
				<span aria-hidden>🔒</span>
			</button>
		</Tooltip>
	);
}
```

## Development

(1) Install dependencies

```bash
$ npm i
# or
$ yarn
```

(2) Run initial validation

```bash
$ ./Taskfile.sh validate
```

(3) Run tests in watch-mode to validate functionality.

```bash
$ ./Taskfile test -w
```

---

_This project was set up by @jvdx/core_

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