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/examples/styling.mdx
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,6 +372,26 @@ In summary, if you do it correctly you can use CSS specificity instead of `!impo
372
372
373
373
:::
374
374
375
+
### Customizing opening/closing animation
376
+
377
+
By default, the tooltip has a fade-in/fade-out transition when opening/closing, with a delay of 150ms for both.
378
+
If you wish to change the delay for any of them, override the following CSS variables:
379
+
380
+
:::caution
381
+
382
+
Do not set `--rt-transition-closing-delay` to `0`. Doing so will result in the tooltip component being stuck (but not visible) on the DOM. This isn't itself a problem, but may lead to performance issues.
383
+
384
+
Set to `1ms` or a similar value if you want to disable the fade-out transition when closing.
385
+
386
+
:::
387
+
388
+
```css
389
+
:root {
390
+
--rt-transition-show-delay: 0.15s;
391
+
--rt-transition-closing-delay: 0.15s;
392
+
}
393
+
```
394
+
375
395
### Disabling ReactTooltip CSS
376
396
377
397
ReactTooltip works seamlessly by automatically injecting CSS into your application. To disable this functionality, use the tooltip prop `disableStyleInjection`.
Copy file name to clipboardExpand all lines: docs/docs/upgrade-guide/changelog-v4-v5.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,9 +50,15 @@ If you run into any problems with the tooltip not updating after changes are mad
50
50
-[x]`float` - `boolean` - used to achieve V4's `effect="float"`
51
51
-[x]`hidden` - `boolean` - when set, the tooltip will not show
52
52
-[x]`render` - `function` - can be used to render dynamic content based on the active anchor element (check [the examples](../examples/render.mdx) for more details)
53
-
-[x]`closeOnEsc` - `boolean` - when set, the tooltip will close after pressing the escape key
54
-
-[x]`closeOnScroll` - `boolean` - when set, the tooltip will close when scrolling (similar to V4's `scrollHide`)
55
-
-[x]`closeOnResize` - `boolean` - when set, the tooltip will close when resizing the window (same as V4's `resizeHide`)
53
+
-[x]`closeOnEsc` - **DEPRECATED** - ~~`boolean` - when set, the tooltip will close after pressing the escape key~~
54
+
-[x]`closeOnScroll` - **DEPRECATED** - ~~`boolean` - when set, the tooltip will close when scrolling (similar to V4's `scrollHide`)~~
55
+
-[x]`closeOnResize` - **DEPRECATED** - ~~`boolean` - when set, the tooltip will close when resizing the window (same as V4's `resizeHide`)~~
56
+
57
+
:::note
58
+
59
+
Use `globalCloseEvents` instead of `closeOnEsc`, `closeOnScroll`, and `closeOnResize`. See the [options page](../options.mdx#available-props) for more details.
60
+
61
+
:::
56
62
57
63
## `V4` props available in `V5`
58
64
@@ -78,10 +84,10 @@ If you run into any problems with the tooltip not updating after changes are mad
78
84
-[x]`delayHide` - also available on anchor element as `data-delay-hide`
79
85
-[ ]`delayUpdate` - can be implemented if requested
80
86
-[x]`delayShow` - also available on anchor element as `data-delay-show`
81
-
-[]`event`
82
-
-[]`eventOff`
87
+
-[x]`event` - functionality changed and renamed to `openEvents`
88
+
-[x]`eventOff` - functionality changed and renamed to `closeEvents`
83
89
-[ ]`isCapture`
84
-
-[]`globalEventOff`
90
+
-[x]`globalEventOff` - functionality changed and renamed to `globalCloseEvents`
85
91
-[ ]`getContent` - pass dynamic values to `content` instead
86
92
-[x]`afterShow`
87
93
-[x]`afterHide`
@@ -92,7 +98,7 @@ If you run into any problems with the tooltip not updating after changes are mad
92
98
-[x]`wrapper` - also available on anchor element as `data-tooltip-wrapper`
93
99
-[ ]`bodyMode`
94
100
-[x]`clickable`
95
-
-[]`disableInternalStyle`
101
+
-[x]`disableInternalStyle` - renamed to `disableStyleInjection`
0 commit comments