<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/HoverEffectContent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18HoverEffectContentP"
  },
  "title" : "HoverEffectContent"
}
-->

# HoverEffectContent

A type that describes the effects of a view for a particular hover
effect phase.

```
protocol HoverEffectContent
```

## Overview

```
Color.red
    .hoverEffect { effect, isActive, proxy in
        effect.opacity(isActive ? 1 : 0.5)
    }
```

You don’t conform to this protocol yourself. Instead, effects are described
by calling modifier functions on other effects, like the `opacity(_:)`
modifier used in the example above.

## Topics

### Instance Methods

[`func animation(Animation?, body: (EmptyHoverEffectContent) -> some HoverEffectContent) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/animation(_:body:))

Applies the given [`Animation`](/documentation/SwiftUI/Animation) to all effects within the `body` closure.

[`func clipShape<S>(S, style: FillStyle) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/clipShape(_:style:))

Sets a clipping shape for the view.

[`func offset(CGSize) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/offset(_:))

Offsets the view by the horizontal and vertical amount specified in the
offset parameter.

[`func offset(x: CGFloat, y: CGFloat) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/offset(x:y:))

Offsets the view by the specified horizontal and vertical distances.

[`func opacity(Double) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/opacity(_:))

Sets the transparency of the view.

[`func rotationEffect(Angle, anchor: UnitPoint) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/rotationEffect(_:anchor:))

Rotates content in two dimensions around the specified point.

[`func scaleEffect(_:anchor:)`](/documentation/SwiftUI/HoverEffectContent/scaleEffect(_:anchor:))

Scales the view’s rendered output by the given amount in both the
horizontal and vertical directions, relative to an anchor point.

[`func scaleEffect(x: CGFloat, y: CGFloat, anchor: UnitPoint) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/scaleEffect(x:y:anchor:))

Scales the view’s rendered output by the given horizontal and vertical
amounts, relative to an anchor point.

[`func transformEffect(CGAffineTransform) -> some HoverEffectContent`](/documentation/SwiftUI/HoverEffectContent/transformEffect(_:))

Applies an affine transformation to the view’s rendered output.

## Relationships

### Conforming Types

[`EmptyHoverEffectContent`](/documentation/SwiftUI/EmptyHoverEffectContent)

[`ModifiedContent`](/documentation/SwiftUI/ModifiedContent)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)