Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rmc-tooltip

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rmc-tooltip

React Tooltip

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
increased by7.03%
Maintainers
1
Weekly downloads
 
Created
Source

rmc-tooltip


React Tooltip

NPM version build status Test coverage gemnasium deps node version npm download

Screenshot

Install

rmc-tooltip

Usage

var Tooltip = require('rmc-tooltip');
var React = require('react');
var ReactDOM = require('react-dom');

// By default, the tooltip has no style.
// Consider importing the stylesheet it comes with:
// 'rmc-tooltip/assets/bootstrap_white.css'

ReactDOM.render(<Tooltip placement="left" overlay={<span>tooltip</span>}><a href='#'>hover</a></Tooltip>, container);

Examples

npm start and then go to http://localhost:8007/examples

Online examples: http://react-component.github.io/tooltip/examples/

API

Props

nametypedefaultdescription
overlayClassNamestringadditional className added to popup overlay
overlayStyleObjectadditional style of overlay node
prefixClsStringrmc-tooltipprefix class name
transitionNameStringsame as https://github.com/react-component/css-transition-group
onVisibleChangeFunctioncall when visible is changed
afterVisibleChangeFunctioncall after visible is changed
visiblebooleanwhether tooltip is visible
defaultVisiblebooleanwhether tooltip is visible initially
placementStringone of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight']
alignObject: alignConfig of [dom-align](https://github.com/yiminghe/dom-align)value will be merged into placement's config
onPopupAlignfunction(popupDomNode, align)callback when popup node is aligned
overlayReact.Element | () => React.Elementpopup content
arrowContentReact.Nodenullarrow content
getTooltipContainerfunctionFunction returning html node which will act as tooltip container. By default the tooltip attaches to the body. If you want to change the container, simply return a new element.
destroyTooltipOnHidebooleanfalsewhether destroy tooltip when tooltip is hidden

Note

Tooltip requires child node accepts onClick event.

Development

npm install
npm start

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

License

rmc-tooltip is released under the MIT license.

Keywords

FAQs

Package last updated on 19 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc