1.0.7 • Published 4 years ago

td-react-tooltip v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

NPM React Tooltips

Lightweight React tooltips, full typescript support

Quick start

  • Installation:

    $ yarn install td-react-tooltip
    # or
    $ npm i td-react-tooltip
  • How to use

    import Tooltip from 'td-react-tooltip';
    
    export function App = ()=>{
      return(
        <>
          <div className="App">
    
            <Tooltip content="Hi, I'm a tooltip on top" direction="top" background="#27ae60">
              <button className="btn">Tooltip on top</button>
            </Tooltip>
    
          </div>
    
        </>
      )
    }
  • Options of tooltips

    • content (*): Text display for tooltip
    • direction (*): position of tooltip box: top - bottom - right - left, default = 'right'
    • delay: Time delay en millisecond before displaying (default = 0 ms)
    • background: background of tooltip box (default = black - #333)
    • color: color of text, default = white
    • fontSize: default 1rem
  • See project example to understand better how it works: Check to Vite.js project in github repo

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago