react-tooltip icon indicating copy to clipboard operation
react-tooltip copied to clipboard

[FEAT REQ] Support array of places in order of preference

Open mdmower-csnw opened this issue 4 months ago • 0 comments

Is your feature request related to a problem? Please describe. It would be great if we could specify an array of preferred places in order for the tooltip to attempt to satisfy before falling back to an internally decided place. Example:

  1. When the screen is wide enough, I like place bottom. Image
  2. As the screen width shrinks, the tooltip automatically gets repositioned to left. Image
  3. I've verified bottom-end would work, though, and that would be my preference over left. Image

Describe the solution you'd like

Support prop place: PlacesType | PlacesType[]. If an array is passed, react-tooltip could try each in order for feasibility before falling back to its own placement decision.

Describe alternatives you've considered For now, I settle on using bottom-end as the next best alternative.

Additional context A similar request was made long ago in https://github.com/ReactTooltip/react-tooltip/issues/225, but I don't understand the suggested resolution there.

mdmower-csnw avatar Aug 02 '25 14:08 mdmower-csnw