Skip to main content
Version: Next

Tooltip

Tooltips display informative text when users tap on an element.

Usage#


Web-platform specific note:

You must pass a valid React Native Modal component implementation into ModalComponent prop because Modal component is not implemented yet in react-native-web

...import Modal from 'modal-react-native-web';
...
<Tooltip ModalComponent={Modal} ... />...

Props#

Tooltip#

Reference#

Tooltip#

ModalComponent#

Override React Native Modal component (usable for web-platform).

TypeDefault
anyNone

backgroundColor#

Sets backgroundColor of the tooltip and pointer.

TypeDefault
ColorValue#617080

closeOnlyOnBackdropPress#

Flag to determine whether to disable auto hiding of tooltip when touching/scrolling anywhere inside the active tooltip popover container. When true, Tooltip closes only when overlay backdrop is pressed (or) highlighted tooltip button is pressed.

TypeDefault
booleanfalse

containerStyle#

Passes style object to tooltip container

TypeDefault
View style(Object){}

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
number40

highlightColor#

Color to highlight the item the tooltip is surrounding.

TypeDefault
ColorValuetransparent

onClose#

Function which gets called on closing the tooltip.

TypeDefault
FunctionFunction

onOpen#

Function which gets called on opening the tooltip.

TypeDefault
FunctionFunction

overlayColor#

Color of overlay shadow when tooltip is open.

TypeDefault
ColorValue#fafafa14

pointerColor#

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

TypeDefault
ColorValue#617080

pointerStyle#

Style to be applied on the pointer.

TypeDefault
View style(Object)None

popover#

Component to be rendered as the display container.

TypeDefault
anyNone

skipAndroidStatusBar#

Force skip StatusBar height when calculating element position. Pass true if Tooltip used inside react-native Modal component.

TypeDefault
booleanfalse

toggleAction#

Define type of action that should trigger tooltip. Available options onPress, onLongPress

TypeDefault
stringonPress

toggleOnPress#

Flag to determine to toggle or not the tooltip on press.

TypeDefault
booleantrue

visible#

To show the tooltip.

TypeDefault
booleanfalse

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
number150

withOverlay#

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

TypeDefault
booleantrue

withPointer#

Flag to determine whether or not to display the pointer.

TypeDefault
booleantrue