Skip to main content
Richard_Doyle
Jun 9, 2022 6:41 PM UTC
Question

Border in auto layout above neighboring items?

I’m trying to create a component with a selected state like so:

The problem is when the selected item is in the middle, one of the neighboring items will cover the border:

I could change the border from outside to inside, but then there’s a gap between the items and the border. Is there a way to achieve the effect I want in Figma?

This topic has been closed for replies.

7 replies

Dave_Ackerman
New Participant
Jun 9, 2022 10:26 PM UTC

Huh, this is interesting. I would imagine implementing some sort of “stack order” – a parallel to z-index in CSS would be possible.

Aug 24, 2023 7:07 PM UTC

Facing same issue
Screenshot 2023-08-25 at 12.37.06 AM

Megan_Kam
Mar 8, 2024 8:03 AM UTC

Anyone has any workarounds to this? I am having the same issue
image

Yasuhiko_Tokunaga1
New Member
Mar 11, 2024 4:13 AM UTC

Does bringing the selected component to the front resolve the issue?

Raphael_M
Power Member
Mar 11, 2024 4:51 AM UTC

There is indeed a workaround but it will only work if you are not changing the fill color during interactions.

Check this: How can I do a shadow effects while hovering on consecutive buttons - #2 by Raphael_M

If you have other questions, let me know.

Thanks.

Megan_Kam
Mar 19, 2024 2:40 AM UTC

Not really, I need to have auto layout activated. If I bring the layer to the top it will move left/right but I need it to be at the center.

Megan_Kam
Mar 19, 2024 2:46 AM UTC

It works, thanks! Just that my design system is using drop shadow with transparency for the typing state, so I can still see the grey border of the next input field.

I’ll need to consider if I should amend the fill color of all the text fields in my variants to standardize it in the design system and do an edge case on the drop shadow in this use case by removing transparency and use solid color instead.