Skip to main content
Question

Card slider adaptation

  • January 18, 2024
  • 1 reply
  • 174 views

Artem_Erofeev

Suppose we have a component - a simple shape, for example, a rectangle.

We place three copies of it in a horizontal autolayout so that their sizes change interconnectedly when the autolayout is stretched left/right.

At the same time, it is important that the third rectangle in the row is in the mask. The width of the mask should always be 1/2 of the width of the other rectangles in the row, according to which the size of the rectangle inside should still change when the autolayout is stretched.

Is it possible to make such a layout?

This topic has been closed for replies.

1 reply

  • Figmate
  • January 19, 2024

Hi Artem, Thanks for getting in touch!

You might need to create two separate components, one with a mask and one without.
I’ve tested on my end in that way, the mask maintains 1/2 of the width of the rectangles in the row when resized.
component with mask

If this aligns with your goal, would you mind giving it a try to see if it works?

Hope this suggestion is helpful! If anyone else has ideas on this, feel free to chime in!

Thanks,