0.4.13 • Published 5 years ago
uxcore-tooltip v0.4.13
uxcore-tooltip
TL;DR
tooltip ui component for react
setup develop environment
$ git clone https://github.com/uxcore/uxcore-tooltip
$ cd uxcore-tooltip
$ npm install
$ gulp server
Usage
import Tooltip from 'uxcore-tooltip';
ReactDOM.render(
<Tooltip
placement="top"
trigger="hover"
overlay={title}
<span>tooltip</span>
</Tooltip>, document.getElementById('target'));
demo
http://uxcore.github.io/uxcore/components/tooltip/
API
props
参数 | 类型 | 默认值 | 说明 | ||
---|---|---|---|---|---|
overlayClassName | string | uxcore | additional className added to popup overlay | ||
trigger | string[] | 'hover' | which actions cause tooltip shown. enum of 'hover','click','focus' | ||
mouseEnterDelay | number | 0 | delay time to show when mouse enter.unit: s. | ||
mouseLeaveDelay | number | 0.1 | delay time to hide when mouse leave.unit: s. | ||
overlayStyle | Object | additional style of overlay node | |||
wrapStyle | Object | additional style of wrap node | |||
prefixCls | String | kuma-tooltip | prefix class name | ||
onVisibleChange | Function | call when visible is changed | |||
visible | boolean | whether tooltip is visible | |||
defaultVisible | boolean | whether tooltip is visible initially | |||
placement | String | Object | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', | 'bottomRight'] or alignConfig of dom-align | |
align | Object: alignConfig of dom-align | only valid when placement's type | is String. value will be merged into placement's align config. note: can only accept offset and targetOffset | ||
overlay | React.Element | popup content | |||
getTooltipContainer | function | function returning html node which will act as tooltip contaier |
0.4.13
5 years ago
0.4.12
6 years ago
0.4.11
6 years ago
0.4.10
6 years ago
0.4.9
6 years ago
0.4.8
6 years ago
0.4.7
7 years ago
0.4.6
7 years ago
0.4.5
7 years ago
0.4.4
7 years ago
0.4.3
7 years ago
0.4.2
7 years ago
0.4.1
7 years ago
0.4.0-beta.0
7 years ago
0.3.4
8 years ago
0.3.3
8 years ago
0.3.2
8 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.4
8 years ago
0.2.3
8 years ago
0.2.2
9 years ago
0.2.1
9 years ago
0.2.0
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago