tooltip ui component for react
- support ie8,ie8+,chrome,firefox,safari
var Tooltip = require('rc-tooltip');
var React = require('react');
React.render(<Tooltip placement="left" trigger={['click']} overlay={<span>tooltip</span>}><a href='#'>hover</a></Tooltip>, container);
http://localhost:8000/examples/index.md
online example: http://react-component.github.io/tooltip/build/examples/
name | type | default | description |
---|---|---|---|
className | String | additional css class of root dom node | |
prefixCls | String | rc-tooltip | prefix class name |
transitionName | String | same as https://github.com/react-component/css-transition-group | |
onVisibleChange | Function | call when visible is changed | |
visible | boolean | whether tooltip is visible | |
defaultVisible | boolean | whether tooltip is visible initially | |
placement | String | one of ['left','right','top','bottom'] | |
overlay | React.Element | popup content |
npm install
npm start
http://localhost:8000/tests/runner.html?coverage
rc-tooltip is released under the MIT license.