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: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,7 @@ The `HighlightToolTip` component accepts the following props:
78
78
|`tooltipPosition`|`TooltipPosition`| No | 'bottom' | Position of the tooltip relative to the target |
79
79
|`offset`|`{ x?: number; y?: number }`| No |`{ x: 0, y: 0 }`| Offset for tooltip positioning |
80
80
|`allowOverlap`|`boolean`| No |`false`| Whether to allow tooltip to overlap with the target |
81
+
|`measureOffsetY`|`number`| No |`0`| Y-axis offset for coordinate measurement correction |
81
82
82
83
### TooltipPosition Types
83
84
@@ -98,6 +99,30 @@ type TooltipPosition =
98
99
99
100
## Advanced Usage
100
101
102
+
### Coordinate Measurement Correction
103
+
104
+
If you notice that the highlight position is slightly off (especially on devices with status bars, notches, or navigation bars), you can use the `measureOffsetY` prop to correct the Y-axis positioning:
105
+
106
+
```jsx
107
+
<HighlightToolTip
108
+
targetRef={targetRef}
109
+
measureOffsetY={-24} // Adjust by -24px if highlight appears too low
0 commit comments