1.0.6 • Published 4 years ago

rn-tooltip-boosted v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

rn-tooltip-boosted

Simple, lightwweight and blazing fast react native tooltip

Expo App if you want to try it out: https://expo.io/@andreixoc/RNTooltipTester

Code for the Expo app is here: https://github.com/andreiCalazans/rnTooltipTester

Install

yarn add rn-tooltip

or

npm install rn-tooltip --save

Usage

import { Text } from 'react-native';
import Tooltip from 'rn-tooltip';

...

<Tooltip popover={<Text>Info here</Text>}>
  <Text>Press me</Text>
</Tooltip>

Props


Reference

backgroundColor

sets backgroundColor of the tooltip and pointer.

TypeDefault
string#617080

containerStyle

Passes style object to tooltip container

TypeDefault
object (style)inherited styling

height

Tooltip container height. Necessary in order to render the container in the correct place. Pass height according to the size of the content rendered inside the container.

TypeDefault
numberstring40

highlightColor

Color to highlight the item the tooltip is surrounding.

TypeDefault
stringtransparent

onClose

function which gets called on closing the tooltip.

TypeDefault
function() => {}

onOpen

function which gets called on opening the tooltip.

TypeDefault
function() => {}

pointerColor

Color of tooltip pointer, it defaults to the backgroundColor if none is passed .

TypeDefault
stringbackgroundColor

pointerStyle

Passes style object to tooltip pointer view

TypeDefault
object (style)inherited styling

popover

Component to be rendered as the display container.

TypeDefault
React.Elementnull

actionType

Flag to determine how the tooltip reacts to presses.

TypeDefault
press or none or longPresspress

width

Tooltip container width. Necessary in order to render the container in the correct place. Pass height according to the size of the content rendered inside the container.

TypeDefault
numbernumber150

withOverlay

Flag to determine whether or not dislay overlay shadow when tooltip is open.

TypeDefault
booleantrue

overlayColor

Sets backgroundColor of the overlay.

TypeDefault
stringrgba(250, 250, 250, 0.70)

withPointer

Flag to determine whether or not dislay pointer.

TypeDefault
booleantrue

toggleWrapperProps

Drills TouchableOpacity Props down to the TouchableOpacity wrapper that toggles the Tooltip.

TypeDefault
TouchableOpacityProps{}

MIT Licensed

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago