Skip to main content
.rotationEffect(rotation: { degrees: number, anchor?: UnitPoint } | number): Component;

Parameters

rotation
{ degrees: number, anchor?: UnitPoint } | number
The rotation configuration. Can be a number of degrees or an object for detailed control.

Support

Usage

Simple rotation

Text("Rotated text")
    .rotationEffect(45)

Rotation with anchor

Rectangle()
    .fill(Color("green"))
    .rotationEffect({ degrees: 90, anchor: "topLeading" })

Full rotation

Image("arrow.png")
    .rotationEffect(180)