---
title: "hoverEffectDisabled(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/hovereffectdisabled(_:)"
---

# hoverEffectDisabled(_:)

Adds a condition that controls whether this view can display hover effects.

## Declaration

```swift
nonisolated func hoverEffectDisabled(_ disabled: Bool = true) -> some View

```

## Parameters

- `disabled`: A Boolean value that determines whether this view can display hover effects.

## Return Value

Return Value A view that controls whether hover effects can be displayed in this view.

## Discussion

Discussion The higher views in a view hierarchy can override the value you set on this view. In the following example, the button does not display a hover effect because the outer hoverEffectDisabled(_:) modifier overrides the inner one: HStack {     Button("Press") {}         .hoverEffectDisabled(false) } .hoverEffectDisabled(true)

## See Also

### Responding to hover events

- [onHover(perform:)](swiftui/view/onhover(perform:).md)
- [onContinuousHover(coordinateSpace:perform:)](swiftui/view/oncontinuoushover(coordinatespace:perform:).md)
- [hoverEffect(_:isEnabled:)](swiftui/view/hovereffect(_:isenabled:).md)
- [defaultHoverEffect(_:)](swiftui/view/defaulthovereffect(_:).md)
- [isHoverEffectEnabled](swiftui/environmentvalues/ishovereffectenabled.md)
- [HoverPhase](swiftui/hoverphase.md)
- [HoverEffectPhaseOverride](swiftui/hovereffectphaseoverride.md)
- [OrnamentHoverContentEffect](swiftui/ornamenthovercontenteffect.md)
- [OrnamentHoverEffect](swiftui/ornamenthovereffect.md)
