JSPM

react-tooltip

0.2.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1333531
  • Score
    100M100P100Q227808F
  • License MIT

react tooltip component

Package Exports

  • react-tooltip

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-tooltip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-tooltip

React tooltip component, inspired by tooltipsy (a jquery plugin I've used)

Version

Installation

npm install react-tooltip --save

Usage

1 . Require react-tooltip after installation

var ReactTooltip = require("react-tooltip")

2 . Include css or scss file(you can find them in dist folder) into your project

sass: @import "react-tooltip";

3 . Add data-tip = "your placeholder" to your element

<p data-tip="hello world">Tooltip</p>

4 . Including react-tooltip component

<ReactTooltip />

Options

Every option has default value, You don't need to add option if default options are enough.

The options set to <ReactTooltip /> will affect all tootips in a same page and options set to specific element only affect the specific tooltip's behaviour.

Check example: React-tooltip Test

Place: String [ top, right, bottom, left ]
Specific element:
    <p data-tip="tooltip" data-place="top"></p>

global:	
    <ReactTooltip place="top"/>
Type: String [ dark, success, warning, error, info, light ]
Specific element:
    <p data-tip="tooltip" data-type="dark"></p>
        
global:	
    <ReactTooltip type="dark"/>
Effect: String [ float, solid ]
Specific element:
    <p data-tip="tooltip" data-type="float"></p>
    
global:	
    <ReactTooltip type="float"/>

License

MIT