Tooltip
Tooltips display informative text when users tap on an element.
#
UsageWeb-platform specific note:
You must pass a valid React Native
Modal
component implementation intoModalComponent
prop becauseModal
component is not implemented yet inreact-native-web
...import Modal from 'modal-react-native-web';
...
<Tooltip ModalComponent={Modal} ... />...
#
Props#
Tooltip- ModalComponent
- backgroundColor
- closeOnlyOnBackdropPress
- containerStyle
- height
- highlightColor
- onClose
- onOpen
- overlayColor
- pointerColor
- pointerStyle
- popover
- skipAndroidStatusBar
- toggleAction
- toggleOnPress
- visible
- width
- withOverlay
- withPointer
#
Reference#
Tooltip#
ModalComponentOverride React Native Modal
component (usable for web-platform).
Type | Default |
---|---|
any | None |
#
backgroundColorSets backgroundColor of the tooltip and pointer.
Type | Default |
---|---|
ColorValue | #617080 |
#
closeOnlyOnBackdropPressFlag 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.
Type | Default |
---|---|
boolean | false |
#
containerStylePasses style object to tooltip container
Type | Default |
---|---|
View style(Object) | {} |
#
heightTooltip 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.
Type | Default |
---|---|
number | 40 |
#
highlightColorColor to highlight the item the tooltip is surrounding.
Type | Default |
---|---|
ColorValue | transparent |
#
onCloseFunction which gets called on closing the tooltip.
Type | Default |
---|---|
Function | Function |
#
onOpenFunction which gets called on opening the tooltip.
Type | Default |
---|---|
Function | Function |
#
overlayColorColor of overlay shadow when tooltip is open.
Type | Default |
---|---|
ColorValue | #fafafa14 |
#
pointerColorColor of tooltip pointer, it defaults to the backgroundColor
if none is passed.
Type | Default |
---|---|
ColorValue | #617080 |
#
pointerStyleStyle to be applied on the pointer.
Type | Default |
---|---|
View style(Object) | None |
#
popoverComponent to be rendered as the display container.
Type | Default |
---|---|
any | None |
#
skipAndroidStatusBarForce skip StatusBar height when calculating element position. Pass true
if Tooltip used inside react-native Modal component.
Type | Default |
---|---|
boolean | false |
#
toggleActionDefine type of action that should trigger tooltip. Available options onPress, onLongPress
Type | Default |
---|---|
string | onPress |
#
toggleOnPressFlag to determine to toggle or not the tooltip on press.
Type | Default |
---|---|
boolean | true |
#
visibleTo show the tooltip.
Type | Default |
---|---|
boolean | false |
#
widthTooltip 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.
Type | Default |
---|---|
number | 150 |
#
withOverlayFlag to determine whether or not display overlay shadow when tooltip is open.
Type | Default |
---|---|
boolean | true |
#
withPointerFlag to determine whether or not to display the pointer.
Type | Default |
---|---|
boolean | true |