react-overflow-tooltip

A React component that shows a tooltip only if the text is overflow

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-overflow-tooltip
2.0.15 years ago7 years agoMinified + gzip package size for react-overflow-tooltip in KB

Readme

react-overflow-tooltip
!npmnpm-imagenpm-url !travistravis-imagetravis-url
A React component that shows a tooltip only if the text is overflow.
var ReactOverflowTooltip = require('react-overflow-tooltip')

<ReactOverflowTooltip title='too long text'>
  <div>too long text</div>
</ReactOverflowTooltip>
// => <div title="too long text...">too long text...</div>

<ReactOverflowTooltip title='short text'>
  <div>{ text }</div>
</ReactOverflowTooltip>
// => <div>too long text...</div>

Install

npm install react-overflow-tooltip

License

ISC