# rctx-tooltip

> Tooltip for React library

Latest version **1.0.11** (published 2019-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install rctx-tooltip
pnpm add rctx-tooltip
yarn add rctx-tooltip
bun add rctx-tooltip
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2019-12-15 |
| First published | 2019-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 386.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | reachtokish |
| Maintainers | reachtokish |
| Keywords | react, tooltip, react-tooltip, rctx, react-component |

## Links

- npm: https://www.npmjs.com/package/rctx-tooltip
- Repository: https://github.com/reachtokish/rctx-tooltip
- Homepage: https://github.com/reachtokish/rctx-tooltip#readme
- Issues: https://github.com/reachtokish/rctx-tooltip/issues
- npm.io page: https://npm.io/package/rctx-tooltip

## Dependencies (1)

- [react-transition-group](https://npm.io/package/react-transition-group.md) ^4.3.0

## 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

- 1.0.11 (latest) — 2019-12-15
- 1.0.10 — 2019-12-12
- 1.0.9 — 2019-12-12
- 1.0.8 — 2019-12-12
- 1.0.7 — 2019-12-12
- 1.0.6 — 2019-12-12
- 1.0.5 — 2019-12-12
- 1.0.4 — 2019-12-09
- 1.0.3 — 2019-12-08
- 1.0.2 — 2019-12-08
- 1.0.1 — 2019-12-08
- 1.0.0 — 2019-12-08

## README

# rctx-tooltip

Tooltip package extensively for react library

## Installation
```bash
npm install --save rctx-tooltip
```

## Usage

```jsx
import React, { Component } from 'react';
import RCTXTooltip from 'rctx-tooltip';

class Example extends Component {
  render () {
    return (
      <RCTXTooltip>
        <button>Hover over me</button>
      </RCTXTooltip>
    )
  }
}
```

## Key features
- Accept string or html.
- Inbuild animation like zoom or fade.
- Position the tooltip like however you want. You can specify offset as well.
- Add class to the tooltip or tooltip container element and style it however you want.
- Bunch of events like onShown or onHidden.
- Control scroll or resize hide.
- Append the tooltip anywhere you want.

## Options
Checkout the example <a href="https://reachtokish.github.io/rctx-tooltip/" target="_blank">demo</a>
<table class="table table-bordered table-striped">
  <thead>
  <tr>
    <th style="width: 60px;">Name</th>
    <th style="width: 50px;">Type</th>
    <th style="width: 10px;">Options</th>
    <th>Description</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td>content</td>
      <td>String or Html</td>
      <td>default String</td>
      <td>It takes String or Html as input</td>
    </tr>
    <tr>
      <td>isVisible</td>
      <td>Boolean</td>
      <td>true / false<br />Default: false</td>
      <td>Show hide tooltip based on value</td>
    </tr>
    <tr>
      <td>position</td>
      <td>String</td>
      <td>"top left" / "top right" / "bottom left" / "bottom right" / "top center" / "right center" / "bottom center" / "left center" (+ is also applicable after top/right bottom/left like "top+10 left")<br />Default: "top left"</td>
      <td>Set tooltip position</td>
    </tr>
    <tr>
      <td>animation</td>
      <td>String</td>
      <td>"fade" / "zoom"<br />Default: "fade"</td>
      <td>Set animations for tooltip</td>
    </tr>
    <tr>
      <td>event</td>
      <td>String</td>
      <td>"hover" / "click" / "focus"<br />Default: "hover"</td>
      <td>Show tooltip on hover</td>
    </tr>
    <tr>
      <td>delayHide</td>
      <td>Number</td>
      <td>Any number</td>
      <td>Hides tooltip in delay time mentioned</td>
    </tr>
    <tr>
      <td>delayShow</td>
      <td>Number</td>
      <td>Any number</td>
      <td>Show tooltip in delay time mentioned</td>
    </tr>
    <tr>
      <td>tooltipClass</td>
      <td>String</td>
      <td>Any string</td>
      <td>Add class in the tooltip popup</td>
    </tr>
    <tr>
      <td>tooltipContainerClass</td>
      <td>String</td>
      <td>Any string</td>
      <td>Add class in the tooltip container popup</td>
    </tr>
    <tr>
      <td>eventOff</td>
      <td>String</td>
      <td>"dblclick"</td>
      <td>On double click only close the tooltip</td>
    </tr>
    <tr>
      <td>scrollToHide</td>
      <td>Boolean</td>
      <td>true / false<br />Default: true</td>
      <td>On window scroll hides the tooltip</td>
    </tr>
    <tr>
      <td>resizeToHide</td>
      <td>Boolean</td>
      <td>true / false<br />Default: true</td>
      <td>On window resize hides the tooltip</td>
    </tr>
    <tr>
      <td>appendTo</td>
      <td>String</td>
      <td>"body" / ".your_class_wrap" / "#your_id_wrap"<br />Default: Enclosed element</td>
      <td>Append tooltip inside the input element</td>
    </tr>
    <tr>
      <td>onHidden</td>
      <td>Function</td>
      <td>onHidden={() => console.log("I am hidden!!")}</td>
      <td>Invokes after tooltip gets hidden</td>
    </tr>
    <tr>
      <td>onShown</td>
      <td>Function</td>
      <td>onShown={() => console.log("I am visible!!")}</td>
      <td>Invokes after tooltip gets visible</td>
    </tr>
  </tbody>
</table>

## Contributing 🙏
We will welcome any kind of contribution, small to big, suggestion to bug fixing or even collaborating. You can fork the repo and then make some changes and make a pull request. We will review your code and merge it 👏.

## License
MIT © [reachtokish](https://github.com/reachtokish)

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