Scale interactive components from centre

Hi I’m having trouble with scaling from the centre when creating an interactive component. At the moment it’s scaling from the top left corner.

I found this solution to the same question a while ago:

‘Define the parent frame (ie the component frame) at a fixed size, and then put your size-changing button frame inside that. You can then modify the button size as you need while keeping it positioned centrally to the component.’

But this doesn’t help me at all :sob: - is anyone able to give me a step by step guide?

Thank you!

1 Like

Well I have the same problem, and when I found this result, I was hoping it would be one of those easy answers, but apparently not, since nobody has replied. Bummer.

I was also having this same issue and couldn’t find an answer online. But then it occurred to me that this was only an issue on components, but that from frame to frame it is not an issue. I realized that if you use the same “frame” model within components, it works just the same.

For example, let’s say that you want to create a simple button as an interactive component that you want to scale from the center. Create a frame that is slightly larger than your button’s default state. Place design your button within this frame with the transparent padding that you will need around the button. Create a component from this button and create a variant from the first state. Scale the button within the frame, don’t scale the variant itself. Provided that all of your constraints are set accordingly to scale, it should work as desired. I hope this helps.

1 Like

Here is the example. Let me know if you need any additional details. https://www.figma.com/proto/lTluPpofCnB3TaoO0ZZUsj/Hover-Example?page-id=0%3A1&node-id=2%3A15&viewport=459%2C407%2C1&scaling=min-zoom

1 Like

Use Shift+ALT while resizing.

Had the same issue.

I fixed it by creating a frame of the items in the same size as the one before and set it to transparent. Then you can position your group in the next Variant easily.

To resolve this, set a center constraint for left and right sides, and scale to the top and bottom to your default component. Create a variant, press “K” and adjust the size to your specified value, such as 0.95 from 1x. No extra frames or shift alt/cmd necessary! YW!

1 Like

You are awesome. Thanks for this shortcut! :smile: :pray:

1 Like