Replies: 2 comments
-
I am also interested in resolving this issue. Any updates? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This discussion is a duplicate of [RAC] Can't use Tooltip with Switch lets move further comments over there. Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
We're using react-aria-components, and are pretty happy with everything so far, but we have hit a bit of a challenge with RadioGroup and Tooltip.

We have a use-case for a group of buttons where the buttons act as a radio group, to select between different settings. Usually we would just use the icon variant, and have information about what the option does show as a tooltip:
This is for a web application that'll only be used on desktops, not mobile.
The existing react-aria-components Radio does not support tooltips as the focusableProps are put onto a VisuallyHidden input component:
react-spectrum/packages/react-aria-components/src/RadioGroup.tsx
Lines 227 to 229 in 4baa1b0
We've managed to hack in support for tooltips doing something like below (not functioning code, if necessary I can create a codesandbox):
The issue with this is that if you click on the button while the tooltip animation is playing then it gets re-positioned to the visually hidden input element, so it looks weird:

If the animation completes (we just use the default animation for RAC tooltips) then everything works fine.
So my question is:
Beta Was this translation helpful? Give feedback.
All reactions