Skip to main content
Solved

Auto-layout component with tooltip


alexf

I’m trying to create a button with a tooltip on hover:
figma6

The only problem is, as the text is different for each button, so is the size and I can’t use auto-layout as the tooltip will now be included in the frame and so the hover will break:
figma5

If I put the button with different text into an auto-layout next to another button, I get this:
image

Basically, is there a way to resize the component frame without breaking the hover?

Best answer by tank666

Hi @alexf. You can put a tooltip in a zero-height frame, and this frame in Auto Layout. I just updated the community file where I added a tooltip for the buttons. Duplicate and see how it works.

Figma
View original
This topic has been closed for replies.

tank666

Hi @alexf. You can put a tooltip in a zero-height frame, and this frame in Auto Layout. I just updated the community file where I added a tooltip for the buttons. Duplicate and see how it works.

Figma

alexf
  • New Participant
  • June 10, 2021

That’s awesome. Thanks for that! 😃


alexf
  • New Participant
  • June 10, 2021

Hey @tank666, curious how you managed to make the frame zero-height? I can only get mine to go to 1px.


tank666

Just write in the input .001.


Gabriel_R
  • New Member
  • September 4, 2024

It’s been a while, so this is now solved properly with the “Absolute position” option.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings