Skip to main content

We are working on a project where we need to flip icons horizontally using Figma APIs. Specifically, we want to change the orientation of icons from left-to-right to right-to-left for all nodes within a design file.


Could you please guide us on how to achieve this using Figma APIs? If there are any specific methods or best practices for implementing this transformation, we would greatly appreciate your input.


Thank you for your assistance, and we look forward to your guidance.

To flip nodes, you need to change the transformation matrix provided by the relativeTransform property.

For example, to flip horizontally, you can use this code:

node.relativeTransform = [
[-1, 0, x],
[0, 1, y]
]

 


Reply