This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Adam Deher
Posted Apr 27 - Read on Facebook

Is there a way to get framer to respect the dimensions of transparent layers when importing from sketch? For example, I have a group called button. It has two sub layers, icon and hit_area. The hit area has dimensions of 60px by 60px and is transparent. The layer icon is 30px by 30px and is centered on the layer hit_area. I would like the group, button, to have the total dimensions of all the layers in group, so a total of 60 px by 60 px and not the 30px by 30 px of only the icon layer.

Is there a reason that I am missing why this would not be the proper convention?



Arun Venkatesan

I haven't been able to get this to work either

Adam Deher

I have noticed that this might be a limitation of Sketch. When exporting the group, sketch ignores the transparent layers.

Marc Krenn

Here's what you can do:
1) Add a Sketch group to your button and move it behind/below all of your other button-layers
2) Add a rectangle of the desired dimension to this group.
3) Set the rectangle's fill to alpha or opacity = 0

Sergey Voronov

Trick for now to have background with dimension, white color and 1% opacity

Sigurd Tapio Mannsåker

Just stick both the hit area and the icon in their own groups as well, and it should work – works here at least. So I have a group named 'button', containing groups named 'icon' and 'hitArea'. The 'hitArea' group only contains a rectangle with no fill at all. No opacity trickery needed :)

Koen Bok

You should be able to put the layer in a group with a mask that is the desired size.

Read the entire post on Facebook