You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/options.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@ import { Tooltip } from 'react-tooltip';
66
66
| data-tooltip-position-strategy | string | false |`absolute`|`absolute``fixed`| The position strategy used for the tooltip. Set to `fixed` if you run into issues with `overflow: hidden` on the tooltip parent container |
67
67
| data-tooltip-delay-show | number | false || any `number`| The delay (in ms) before showing the tooltip |
68
68
| data-tooltip-delay-hide | number | false || any `number`| The delay (in ms) before hiding the tooltip |
69
+
| data-tooltip-auto-close | number | false || any positive `number`| Automatically closes the tooltip after the given time (in ms), even if the anchor is still hovered |
69
70
| data-tooltip-float | boolean | false |`false`|`true``false`| Tooltip will follow the mouse position when it moves inside the anchor element (same as V4's `effect="float"`) |
70
71
| data-tooltip-hidden | boolean | false |`false`|`true``false`| Tooltip will not be shown |
71
72
| data-tooltip-class-name | string | false ||| Classnames for the tooltip container |
@@ -107,6 +108,7 @@ import { Tooltip } from 'react-tooltip';
107
108
|`positionStrategy`|`string`| no |`absolute`|`absolute``fixed`| The position strategy used for the tooltip. Set to `fixed` if you run into issues with `overflow: hidden` on the tooltip parent container |
108
109
|`delayShow`|`number`| no || any `number`| The delay (in ms) before showing the tooltip |
109
110
|`delayHide`|`number`| no || any `number`| The delay (in ms) before hiding the tooltip |
111
+
|`autoClose`|`number`| no || any positive `number`| Automatically closes the tooltip after the given time (in ms). When the active anchor changes, the timer starts again for the new anchor |
110
112
|`float`|`boolean`| no |`false`|`true``false`| Tooltip will follow the mouse position when it moves inside the anchor element (same as V4's `effect="float"`) |
111
113
|`hidden`|`boolean`| no |`false`|`true``false`| Tooltip will not be shown |
112
114
|`noArrow`|`boolean`| no |`false`|`true``false`| Tooltip arrow will not be shown |
This is useful when the tooltip should dismiss after a short reading window even if the user keeps hovering the same anchor. When the active anchor changes, the timer starts again for the newly active anchor.
58
+
47
59
## What should I use instead?
48
60
49
61
### Replace `data-tooltip-html` with tooltip `children`
@@ -97,5 +109,6 @@ If you previously used HTML strings for multiline tooltips, render JSX instead:
97
109
-`content` is still supported for plain string content
98
110
-`children` and `render` are now the recommended way to display rich tooltip content
99
111
-`portalRoot` is optional and only needed when you want the tooltip rendered outside its default location
112
+
-`autoClose` is optional and only needed when the tooltip should dismiss itself after a fixed visible duration
100
113
101
114
Check the current examples for [children](../examples/children.mdx), [render](../examples/render.mdx), and [multiline content](../examples/multiline.mdx).
This is useful when the tooltip should dismiss after a short reading window even if the user keeps hovering the same anchor. When the active anchor changes, the timer starts again for the newly active anchor.
58
+
47
59
## What should I use instead?
48
60
49
61
### Replace `data-tooltip-html` with tooltip `children`
@@ -97,5 +109,6 @@ If you previously used HTML strings for multiline tooltips, render JSX instead:
97
109
-`content` is still supported for plain string content
98
110
-`children` and `render` are now the recommended way to display rich tooltip content
99
111
-`portalRoot` is optional and only needed when you want the tooltip rendered outside its default location
112
+
-`autoClose` is optional and only needed when the tooltip should dismiss itself after a fixed visible duration
100
113
101
114
Check the current examples for [children](../examples/children.mdx), [render](../examples/render.mdx), and [multiline content](../examples/multiline.mdx).
0 commit comments