Contents

hoverEffect(_:)

Applies a hover effect to this view.

Declaration

nonisolated func hoverEffect(_ effect: HoverEffect = .automatic) -> some View

Parameters

  • effect:

    The effect to apply to this view.

Return Value

A new view that applies a hover effect to self.

Discussion

By default, automatic is used. You can control the behavior of the automatic effect with the defaultHoverEffect(_:) modifier.

See Also

Changing view appearance for hover events