# reactip

> react tooltip component

Latest version **2.0.0** (published 2019-01-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install reactip
pnpm add reactip
yarn add reactip
bun add reactip
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-01-26 |
| First published | 2016-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 63 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 64 |
| Author | huozhi |
| Maintainers | huozhi |
| Keywords | react, tooltip |

## Links

- npm: https://www.npmjs.com/package/reactip
- Repository: https://github.com/huozhi/reactip
- Homepage: https://github.com/huozhi/reactip#readme
- Issues: https://github.com/huozhi/reactip/issues
- npm.io page: https://npm.io/package/reactip

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-01-26
- 1.1.0 — 2018-02-25
- 1.0.0 — 2017-12-29
- 1.0.0-0 — 2017-10-29
- 0.3.0 — 2017-04-25
- 0.2.1 — 2017-03-27
- 0.2.0 — 2016-12-26
- 0.1.0 — 2016-12-26

## README

# Reactip
> tooltip component for react.

## Examples

visist https://huozhi.github.io/reactip

## Usage

```sh
npm i -S react react-dom @emotion/core # for dependencies
npm i -S reactip
```

> NOTICE: If you don't have these dependencies above, it won't work!

Wrapp the trigger with `Tooltip` component

```js
import React from 'react'
import Tooltip from 'reactip'

const Button = ({children, ...rest}) => (
  <button {...rest}>{children}</button>
)

const Demo = () => (
  <div>
    <Tooltip placement="right" tooltip="something" event="hover">
      <Button className="Button">right</Button>
    </Tooltip>

    <Tooltip placement="top" tooltip="something" event="click">
      <button className="Button">top</button>
    </Tooltip>
  <div>
)
```

## API

| props     | type     | default | description |
| :-------: | :------: | :-----: | :---------: |
| placement | string   | x       | placement tooltip showup: `[top, right, bottom, left]` |
| tooltip   | anything | null    | tooltip content, you can pass DOM node or react component |
| event     | string   | hover   | trigger event: `[hover, click]` |
| offsetParent | node | document.body | position will be calculated relative to this node |
| popupStyle | object | undefined | popup style object |

## License

`Reactip` is released under the MIT license.

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