# spruha-tooltip

> Super Easy React Tooltip

Latest version **2.0.2** (published 2023-06-05) · 0 weekly downloads

## Install

```sh
npm install spruha-tooltip
pnpm add spruha-tooltip
yarn add spruha-tooltip
bun add spruha-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 | 2.0.2 |
| Published | 2023-06-05 |
| First published | 2023-06-05 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Spruha Chitturu |
| Maintainers | developer.spruha |
| Keywords | react, tooltip, easy |

## Links

- npm: https://www.npmjs.com/package/spruha-tooltip
- npm.io page: https://npm.io/package/spruha-tooltip

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.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

- 2.0.2 (latest) — 2023-06-05
- 2.0.1 — 2023-06-05
- 2.0.0 — 2023-06-05
- 1.0.2 — 2023-06-05
- 1.0.1 — 2023-06-05
- 1.0.0 — 2023-06-05

## README

# spruha-tooltip
An easy way to use tooltips in React.JS. 

Positioning the tooltip is made super easy. You should pick one of the positions from a range of 1 to 8 and pass it in the 'position' prop. 

Other props are common CSS styles to decorate your tooltip the way you want. 

Tooltip Positions:


| 1 | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 | 3 |
| ---- | ---- | ---- |
| 8 | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Content&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 4 |
| 7 | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6 | 5|


Example usage is below.

#### Note: Compatible only with React 18.0 and above.





## Usage/Examples

```javascript
import Tooltip from 'spruha-tooltip'

function App() {
  return (
      <Tooltip
      position={1}              //Positions range from 1 - 8
      background={'#1F1F1F'}    //Default --> Black Background
      color={'red'}             //Default --> White Font Color
      padding={'1rem'}          //Default --> 0.5rem
      hover={true}              //Default --> false
      click={false}             //Default --> false
      duration={3000}           //Default --> tooltip appears for 5000ms on click (milliseconds)
      textAlign={'center'}      //Default --> 'left'
      borderRadius={'5px'}      //Default --> 2px I think
      fontWeight={'bold'}       //Default --> 'normal'
      >

        {Your HTML Content Goes Here}

      </Tooltip>
    )
}
```


## Installation

Install my-project with npm

```bash
  npm install spruha-tooltip
```
    
## Authors

- [developer.spruha](https://www.github.com/octokatherine)

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