How to animate elements the right way

Hello, how to animate (scale on click etc) VisualElements? Is there any official best practice. It is possible to do it somehow with DOTween for example?

When I try to scale anything on click (by “experimental” property), it scales to the left upper corner and this is bad, I dont want to “hack” it somehow, I want to go by “The right way” and dont doing stupid workarounds etc.

Thank you

Starting from 2021.2, you can use uss Transitions to perform easy tweens using styles. We also introduced the transform-origin style property which now defaults to the center element so scaling/rotation changes will be done wrt the center of the element.

For performance and maintability reasons we recommend using css transitions over the experimental c# api.