---
title: "rotationEffect(_:anchor:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/hovereffectcontent/rotationeffect(_:anchor:)"
---

# rotationEffect(_:anchor:)

Rotates content in two dimensions around the specified point.

## Declaration

```swift
func rotationEffect(_ angle: Angle, anchor: UnitPoint = .center) -> some HoverEffectContent

```

## Parameters

- `angle`: The angle by which to rotate the content.
- `anchor`: A unit point within the content about which to perform the rotation. The default value is doc://com.apple.SwiftUI/documentation/SwiftUI/UnitPoint/center.

## Return Value

Return Value A rotation effect.

## Discussion

Discussion This effect rotates the content around the axis that points out of the xy-plane. It has no effect on the content’s frame.
