AutomaticHoverEffect

The default hover effect based on the surrounding context.

StructureiOS 18.0+tvOS 18.0+visionOS 2.0+AutomaticHoverEffect in SwiftUI

Declaration

React
type AutomaticHoverEffect = SwiftOpaque<'AutomaticHoverEffect'>;
Swift
struct AutomaticHoverEffect

Overview

The automatic effect will resolve to any View.defaultHoverEffect(_:) applied to the current View hierarchy, or a system-defined effect if no default effect has been defined.

You can also use CustomHoverEffect.automatic to construct this hover effect.

From Apple’s SwiftUI documentation. Code samples there are Swift.

See also

More in Gestures and input.