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

# focusEffectDisabled(_:)

Adds a condition that controls whether this view can display focus effects, such as a default focus ring or hover effect.

## Declaration

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

```

## Parameters

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

## Return Value

Return Value A view that controls whether focus 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 focus effect because the outer focusEffectDisabled(_:) modifier overrides the inner one: HStack {     Button("Press") {}         .focusEffectDisabled(false) } .focusEffectDisabled(true)

## See Also

### Configuring effects

- [isFocusEffectEnabled](swiftui/environmentvalues/isfocuseffectenabled.md)
