Skip to main content
Richard_Doyle
June 9, 2022
Question

Border in auto layout above neighboring items?

  • June 9, 2022
  • 7 replies
  • 1262 views

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
June 9, 2022

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

August 24, 2023

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

Megan_Kam
March 8, 2024

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

Yasuhiko_Tokunaga1
New Member
March 11, 2024

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

Raphael_M
Power Member
March 11, 2024

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
March 19, 2024

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
March 19, 2024

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.