Skip to main content
Question

Creating a 'layered' shadow that responds to auto layout

  • February 22, 2024
  • 4 replies
  • 670 views

Pete_Norris

Hi All,
Trying to create a drop shadow that has a fill AND a stroke.
Drop shadow doesn’t support this as far as I can see, so was thinking about a background layer. BUT… It would need to resize when the top layer resizes (top layer uses auto-layout).
Prefer a native way to do this, but fine to use plugin if needed.

Top image below is default, and the bottom image shows what I don’t want happening when the content changes.

Thanks

4 replies

Pete_Norris
  • Author
  • 2 replies
  • February 22, 2024

Nailed in (Kinda)

  • Make the auto-layout frame ‘clip content’
  • Use 2 shadow (with no blur)
  • on the background use spread to make bigger

A bit of tweaking and the desired effect is there.


dennsi
  • Active Member
  • 256 replies
  • February 22, 2024

Wrap two Auto Layout frames inside an Auto Layout Component. The background layer uses absolute position. Most important part is to link the text layers with the Text property so the change has an effect on the background layer.

Feel free to duplicate this file to your draft to take a closer look:

Figma – 22 Feb 24


tank666
  • 4858 replies
  • February 22, 2024
Auto Layout Frame
  Auto Layout Frame (with fill and stroke)
    Text
  Rectangle (with fill and stroke, in absolute position, with top and bottom and left and right constraints)

Pete_Norris
  • Author
  • 2 replies
  • February 22, 2024

Really appreciate you reaching out, although not entirely sure what you mean by linking the text layers with the text property to affect bg layer.

My solution using a drop shadow appreciate not as versatile, but doing what I need


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