---
title: "hoverEffect(_:in:isEnabled:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/customhovereffect/hovereffect(_:in:isenabled:)"
---

# hoverEffect(_:in:isEnabled:)

Applies this effect in parallel with the given effect.

## Declaration

```swift
func hoverEffect(_ effect: some CustomHoverEffect, in group: HoverEffectGroup? = nil, isEnabled: Bool = true) -> some CustomHoverEffect

```

## Parameters

- `effect`: A doc://com.apple.SwiftUI/documentation/SwiftUI/CustomHoverEffect to combine with this effect.
- `group`: An optional doc://com.apple.SwiftUI/documentation/SwiftUI/HoverEffectGroup to add this effect to.
- `isEnabled`: Whether effect is enabled or not.

## Discussion

Discussion Use hoverEffect(_:) to combine two effects into a single effect that applies both effects in parallel. Modifiers like hoverEffectDisabled(_:) applied to effect will not apply to this effect. For example, in the following effect only the ScaleUpEffect is disabled, since modifiers applied to that effect are applied independently. struct FadeAndScaleEffect: CustomHoverEffect {     @Environment(\.accessibilityReduceMotion) var accessibilityReduceMotion     func body(content: Content) -> some CustomHoverEffect {         content             .hoverEffect { effect, isActive, _ in                 effect.opacity(isActive ? 1 : 0.9)             }             .hoverEffect(                 ScaleUpEffect().hoverEffectDisabled(accessibilityReduceMotion)             )     } }

struct ScaleUpEffect: CustomHoverEffect {     func body(content: Content) -> some CustomHoverEffect {         content.hoverEffect { effect, isActive, _ in             effect.scaleEffect(isActive ? 1.05 : 1.0)         }     } } Returns a new effect that applies both effects in parallel.

## See Also

### Creating custom hover effects

- [hoverEffect(in:isEnabled:body:)](swiftui/customhovereffect/hovereffect(in:isenabled:body:)-swift.method.md)
- [hoverEffectGroup(_:)](swiftui/customhovereffect/hovereffectgroup(_:)-swift.method.md)
- [hoverEffectGroup(id:in:behavior:)](swiftui/customhovereffect/hovereffectgroup(id:in:behavior:)-swift.method.md)
- [hoverEffectDisabled(_:)](swiftui/customhovereffect/hovereffectdisabled(_:).md)
