0.0.3 • Published 6 years ago

@hi-enta/react-native-tooltips v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

React Native: Native Tooltips

This library is a React Native bridge around native tooltips. It allows you to create simple tip views.

Before we dive into on how to use this library. We would like to thank all the contributor of florent37/ViewTooltip & calm/SexyTooltip libraries for providing such a awesome nice, cool library

Getting started

  • npm install react-native-tooltips --save

  • $ react-native link react-native-tooltips

Usage

import RNTooltips from 'react-native-tooltips';
  • React Way
<RNTooltips text={"Long Press Description"} visible={this.state.visible} reference={this.state.reference} />
  • API Way
RNTooltips.Show(
    this.state.reference,
    {
        text: 'Long Press Description'
    }
)

Props

PropTypeDefaultNote
textstringText which needs to be displayed
position: AndroidnumberPosition of the tooltip view. On iOS it is auto adjustable
align: AndroidnumberAlignment of tooltip
autoHideboolShould tip view get auto dismiss
durationnumberDuration after which tooltip view should be dismissed
clickToHide: iOSboolOn click should tooltip view be dismissed
cornernumberRadius of corner
tintColorstringColor of tooltip view background
textColorstringColor of text
textSizenumberSize of text displayed
gravitynumberGravity of text
visibleboolShould tooltip be displayed
shadowboolShadow on tooltip view
referenceobjectReference of react component of which you need tooltip

Credits

Contribution

Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.

License

This library is provided under the MIT License.

RNTooltips @ Pranav Raj Singh Chauhan

Other Contributions

Screenshots

Screenshots Screenshots

npm.io

npm.io

Screenshots

npm.io

npm.io

npm.io

npm.io

npm.io

Screenshots

Screenshots