1.0.5 • Published 7 years ago

react-glamorous-tooltip v1.0.5

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

react-glamorous-tooltip

Installation

npm install react-glamorous-tooltip

Usage

Using NPM

1 . Require react-glamorous-tooltip after installation

import Tooltip from 'react-glamorous-tooltip'

2 . Include react-glamorous-tooltip component

<Tooltip visible targetElm={this.self} position="bottom" arrow="center" >

</Tooltip>

3 . Using react-glamorous-tooltip component wrap up your tooltip content

<Tooltip visible targetElm={this.self} position="bottom" arrow="center" >
     <p>your Tooltip content</p>
</Tooltip>

Demo

Edit ym07mzlxnx

Props

NameDescriptionTypeRequired
visibleDefines if the Tooltip is visible or not. Default: false.Boolean
targetElmtarget element which you want tooltip to point toelement
positionwhere to position your tooltip.string, PropTypes.oneOf('top', 'right', 'bottom', 'left')
fallbackPositionfallback position of your tooltip when it's offscreen.string, PropTypes.oneOf('top', 'right', 'bottom', 'left')
arrowwhere to position the arrow of your tooltip.PropTypes.oneOf(null, 'center', 'top', 'right', 'bottom', 'left')
fallbackArrowfallback arrow position when tooltip is offscreen.PropTypes.oneOf(null, 'center', 'top', 'right', 'bottom', 'left')
stylestyles apply to your tooltipobject, { style: {}, arrowStyle: {} }
positionMarginpositionMargin apply to your tooltip bewteen target element and tooltipnumber
transitiontransition apply to your tooltipstring, Default: 'all'.
childrenchild react elementelement