Figma Support Forum

Should styles be set on the Frame?🌈

I use two ways to make the button, one is to set the style on the background layer, and the other is to use the Frame as the background and set the style on the Frame.

I know that setting the style on the Frame will not have the effect of Smart animate, what is the best way to use in the actual design?

Should Frame only act as a container for layers and not set styles?

Yes, styles should be set on the frame. That’s the only way you can use Auto layout for this button should you need it.

If the style is set on the frame, the effect of Smart animate will not occur, which contradicts the design method?

That’s not correct. It works the same as setting the style on background.

When I set Rotation on the Frame, the Smart animate effect does not happen, but other styles can work normally, such as height and width.
Is Rotation a special use case? Must be on the layer for the Smart animate effect to occur?

Rotation is not a style, it’s one of the transformations. They work just fine with smart animate as well, there are no special cases. But if you are talking about interactive components beta, the transformations applied on variants themselves are not a part of what components inherit (e.g. if you rotate a component, instances won’t be rotated). So to animate rotation when using interactive components, you need to rotate something inside of them, not components themselves. Instead of using a background layer, I would suggest to simply create another frame or instance inside of the component.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.