Skip to main content
Question

Prototyping connection to object shape, and not the bounding frame

  • October 29, 2024
  • 8 replies
  • 54 views

garywaiman.design

Hi all,

So I’m hoping to be able to create a component animation which will “highlight” a particular line in this transit-map style layout - so I created a variant in which the other lines all become grey.

The effect works - but the hover is activating when I hover over the whole bounding box area of the red line, rather than when I just hover over the line.

This is obviously happening because the connection is made to the overall bounding area box of where the red line is.

Is it possible to make the hover only work over the thinner line/object? I guess that it might not be possible given how objects/lines/strokes are represented in Figma. But maybe there’s a workaround, if someone much smarter than me could enlighten me??

Thank you all in advance.

8 replies

y_toku
Figmate
  • Community Support
  • 2317 replies
  • October 29, 2024

Hi there,

Thanks for reaching out. I tested it on my end with a sample, and it seems I was able to do it by zooming in.

My sample is not so clean but I hope it helps! Please let me know how that works.

Thanks,
Toku


garywaiman.design

Hi Toku, thank you for taking the time to try and respond to this.

I have attempted what you did and it is still only connecting to the bounding box.

I think it may have worked for you because you did it on a straight line (so the bounding box is effectively the same area as the line itself).

Could I please trouble you to try this with one of the lines that is not just straight?

(Just typing this, I think I have thought of a hack I could do by dividing all the lines into straight lines - but this would be a very long workaround!)

Thank you in advance


y_toku
Figmate
  • Community Support
  • 2317 replies
  • October 29, 2024

Thanks for getting back to me. Would you be able to share the file link with access to support-share@figma.com? It won’t affect your billing so please add it as an Editor. Hope to investigate it!

Thanks,
Toku


garywaiman.design

Hi Toku,

I have added access for the email address you provided.

I also tried this ‘hack’ I thought would work - by breaking up a compound line (in this case, the red line in my design) into separate straight line segments, and hopefully be able to connect directly to the lines for hover effects.

And in the first screenshot, you will see it attached to this straight line, as the bounding frame/box would be exactly the same area as the line itself.

However, in the second screenshot (post below), you will see I encounter the same as before, whereby the diagonal line segment obviously takes up a large square of bounding frame/box, and therefore, the interactive connection is made to the bounding outline, and so hover effect activates when I hover over the frame/box, rather than when I hover over the line, which I want.

Starting to get the feeling that the way Figma is built, my intended effect is not possible with the prototyping.


garywaiman.design

Second screenshot showing failed connection of prototype line to shape, only connecting to bounding frame/box instead.


y_toku
Figmate
  • Community Support
  • 2317 replies
  • November 1, 2024

While I’m checked internally, unfortunately, it appears that this is a limitation of the current feature. When an object is rotated, Figma generates a bounding box, as you mentioned. While you can technically create the desired hit area if the line is straight, it becomes difficult when dealing with rotated objects or non-straight connected paths.

I apologize for any confusion earlier. If I find any workaround, I’ll be sure to let you know!


garywaiman.design

Yes, I thought that the limitations of the feature might prevent me from creating the prototype and interactions exactly as I want to. And please don’t feel the need to apologise – I highly appreciate your taking time to help me find a solution, and offering your expertise, I am very much a beginner with Figma so it’s all a great learning experience for me!

Thank you once again for your assistance and advice!


Léna000
  • New Member
  • 1 reply
  • March 21, 2025

Hi Gary,

Just commenting to say that I bumped into the same issue today. I’m working with rotated shapes that I want to be triggered on hover and unfortunately since they’re all close to each other, it doesn’t work well because the bounding boxes overlap.

I hope Figma can fix it in the future…


Reply


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