<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ContentTransition",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17ContentTransitionV"
  },
  "title" : "ContentTransition"
}
-->

# ContentTransition

A kind of transition that applies to the content within a single view,
rather than to the insertion or removal of a view.

```
struct ContentTransition
```

## Overview

Set the behavior of content transitions within a view with the
[`contentTransition(_:)`](/documentation/SwiftUI/View/contentTransition(_:)) modifier, passing in one of the defined
transitions, such as [`opacity`](/documentation/SwiftUI/ContentTransition/opacity) or [`interpolate`](/documentation/SwiftUI/ContentTransition/interpolate) as the parameter.

> Tip: Content transitions only take effect within transactions that apply
> an ``doc://com.apple.SwiftUI/documentation/SwiftUI/Animation`` to the views inside the ``doc://com.apple.SwiftUI/documentation/SwiftUI/View/contentTransition(_:)``
> modifier.

Content transitions only take effect within the context of an
[`Animation`](/documentation/SwiftUI/Animation) block.

## Topics

### Getting content transitions

[`identity`](/documentation/SwiftUI/ContentTransition/identity)

The identity content transition, which indicates that content changes
shouldn’t animate.

[`interpolate`](/documentation/SwiftUI/ContentTransition/interpolate)

A content transition that indicates the views attempt to interpolate
their contents during transitions, where appropriate.

[`numericText(countsDown:)`](/documentation/SwiftUI/ContentTransition/numericText(countsDown:))

Creates a content transition intended to be used with `Text`
views displaying numeric text. In certain environments changes
to the text will enable a nonstandard transition tailored to
numeric characters that count up or down.

[`numericText(value:)`](/documentation/SwiftUI/ContentTransition/numericText(value:))

Creates a content transition intended to be used with `Text`
views displaying numbers.

[`opacity`](/documentation/SwiftUI/ContentTransition/opacity)

A content transition that indicates content fades from transparent
to opaque on insertion, and from opaque to transparent on removal.

[`symbolEffect`](/documentation/SwiftUI/ContentTransition/symbolEffect)

A content transition that applies the default symbol effect
transition to symbol images within the inserted or removed view
hierarchy. Other views are unaffected by this transition.

[`symbolEffect(_:options:)`](/documentation/SwiftUI/ContentTransition/symbolEffect(_:options:))

Creates a content transition that applies the symbol Replace
animation to symbol images that it is applied to.



---

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)