Skip to main content
alexf
New Participant
June 2, 2021
Solved

Auto-layout component with tooltip

  • June 2, 2021
  • 5 replies
  • 2398 views

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?

This topic has been closed for replies.
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

5 replies

tank666
tank666Answer
June 10, 2021

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
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
alexf
alexfAuthor
New Participant
June 10, 2021

That’s awesome. Thanks for that! 😃

alexf
alexfAuthor
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
June 10, 2021

Just write in the input .001.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Gabriel_R
New Participant
September 4, 2024

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