0.4.13 • Published 7 years ago

uxcore-tooltip v0.4.13

Weekly downloads
27
License
MIT
Repository
github
Last release
7 years ago

uxcore-tooltip


NPM version build status Test Coverage Dependency Status devDependency Status NPM downloads

Sauce Test Status

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

参数类型默认值说明
overlayClassNamestringuxcoreadditional className added to popup overlay
triggerstring[]'hover'which actions cause tooltip shown. enum of 'hover','click','focus'
mouseEnterDelaynumber0delay time to show when mouse enter.unit: s.
mouseLeaveDelaynumber0.1delay time to hide when mouse leave.unit: s.
overlayStyleObjectadditional style of overlay node
wrapStyleObjectadditional style of wrap node
prefixClsStringkuma-tooltipprefix class name
onVisibleChangeFunctioncall when visible is changed
visiblebooleanwhether tooltip is visible
defaultVisiblebooleanwhether tooltip is visible initially
placementStringObjectone of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft','bottomRight'] or alignConfig of dom-align
alignObject: alignConfig of dom-alignonly valid when placement's typeis String. value will be merged into placement's align config. note: can only accept offset and targetOffset
overlayReact.Elementpopup content
getTooltipContainerfunctionfunction returning html node which will act as tooltip contaier
0.4.13

7 years ago

0.4.12

7 years ago

0.4.11

7 years ago

0.4.10

8 years ago

0.4.9

8 years ago

0.4.8

8 years ago

0.4.7

8 years ago

0.4.6

8 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0-beta.0

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago