<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/HoverEffectPhaseOverride/toggledTemporarily(trigger:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24HoverEffectPhaseOverrideV18toggledTemporarily7triggerACx_tSQRzlFZ"
  },
  "title" : "toggledTemporarily(trigger:)"
}
-->

# toggledTemporarily(trigger:)

Temporaily transitions to the opposite of the effect’s current phase at the moment
the override is applied.

```
static func toggledTemporarily(trigger: some Equatable) -> HoverEffectPhaseOverride
```

## Parameters

`trigger`

A value to observe for changes. The override will be
reapplied whenever this value changes.

## Discussion

Use `toggledTemporarily(trigger:)` to toggle an effect’s current phase until it
fully transitions to its new phase. The transition will use the animations defined
by the effect, but will ignore any delays.

When the override expires, the effect will respond to hover events again. If the
view is hovered, the effect will transition to it’s active phase, otherwise its
inactive phase.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)