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
| data-tooltip-id | string | false ||| The id set on the tooltip element (same as V4's `data-for`) |
65
-
| data-tooltip-content | string | false ||| Content to de displayed in tooltip (`html` is priorized over `content`) |
66
-
| data-tooltip-html | string | false ||| HTML content to de displayed in tooltip |
67
-
| data-tooltip-place | string | false |`top`|`top``right``bottom``left`| Position relative to the anchor element where the tooltip will be rendered (if possible) |
68
-
| data-tooltip-offset | number | false |`10`| any `number`| Space between the tooltip element and anchor element (arrow not included in calculation) |
69
-
| data-tooltip-variant | string | false |`dark`|`dark``light``success``warning``error``info`| Change the tooltip style with default presets |
70
-
| data-tooltip-wrapper | string | false |`div`|`div``span`| Element wrapper for the tooltip container, can be `div`, `span`, `p` or any valid HTML tag |
71
-
| data-tooltip-events |string|false|`hover`|`hover click``hover``click`|Events to watch for when handling the tooltip state|
72
-
| 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 |
73
-
| data-tooltip-show | number | false || any `number`| The delay (in ms) before showing the tooltip |
74
-
| data-tooltip-hide | number | false || any `number`| The delay (in ms) before hiding the tooltip |
75
-
| 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"`) |
62
+
| name | type | required | default| values | description |
| data-tooltip-id | string | false ||| The id set on the tooltip element (same as V4's `data-for`) |
65
+
| data-tooltip-content | string | false ||| Content to de displayed in tooltip (`html` is priorized over `content`) |
66
+
| data-tooltip-html | string | false ||| HTML content to de displayed in tooltip |
67
+
| data-tooltip-place | string | false |`top`|`top``right``bottom``left`| Position relative to the anchor element where the tooltip will be rendered (if possible) |
68
+
| data-tooltip-offset | number | false |`10`| any `number`| Space between the tooltip element and anchor element (arrow not included in calculation) |
69
+
| data-tooltip-variant | string | false |`dark`|`dark``light``success``warning``error``info`| Change the tooltip style with default presets |
70
+
| data-tooltip-wrapper | string | false |`div`|`div``span`| Element wrapper for the tooltip container, can be `div`, `span`, `p` or any valid HTML tag |
71
+
|~~data-tooltip-events~~|~~string~~|~~false~~|~~`hover`~~|~~`hover click``hover``click`~~|~~Events to watch for when handling the tooltip state~~ <br/>**DEPRECATED**<br/>Use `openOnClick` tooltip prop instead|
72
+
| 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 |
73
+
| data-tooltip-show | number | false || any `number`| The delay (in ms) before showing the tooltip |
74
+
| data-tooltip-hide | number | false || any `number`| The delay (in ms) before hiding the tooltip |
75
+
| 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"`) |
|`variant`|`string`| no |`dark`|`dark``light``success``warning``error``info`| Change the tooltip style with default presets |
110
110
|`wrapper`| HTML tag | no |`div`|`div``span``p` ... | Element wrapper for the tooltip container, can be `div`, `span`, `p` or any valid HTML tag |
111
111
|`children`| React node | no |`undefined`| valid React children | The tooltip children have lower priority compared to the `content` prop and the `data-tooltip-content` attribute. Useful for setting default content |
112
-
|`events`|`string[]`| no |`hover`|`hover``click`| Events to watch for when handling the tooltip state |
112
+
|~~`events`~~|~~`string[]`~~|~~no~~|~~`hover`~~|~~`hover``click`~~|~~Events to watch for when handling the tooltip state~~ <br/>**DEPRECATED**<br/>Use `openOnClick` tooltip prop instead |
113
+
|`openOnClick`|`boolean`| no |`false`|`true``false`| Controls whether the tooltip should open when clicking (`true`) or hovering (`false`) the anchor element |
113
114
|`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 |
114
115
|`delayShow`|`number`| no || any `number`| The delay (in ms) before showing the tooltip |
115
116
|`delayHide`|`number`| no || any `number`| The delay (in ms) before hiding the tooltip |
Copy file name to clipboardExpand all lines: docs/docs/upgrade-guide/changelog-v4-v5.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ If you run into any problems with the tooltip not updating after changes are mad
44
44
## New Props
45
45
46
46
-[x]`classNameArrow`
47
-
-[x]`events` (or `data-tooltip-events` on anchor element) - `['hover', 'click']` - default: `['hover']` (always an array when using as prop, even with only one option, when using as data attribute: `data-tooltip-events="hover click"`)
47
+
-[x]`openOnClick` - `boolean` - when set, the tooltip will open on click instead of on hover
48
48
-[x]`isOpen` - `boolean` (to control tooltip state) - if not used, tooltip state will be handled internally
49
49
-[x]`setIsOpen` - `function` (to control tooltip state) - if not used, tooltip state will be handled internally
50
50
-[x]`position` - `{ x: number; y: number }` - similar to V4's `overridePosition`
0 commit comments