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

# AnimatablePair

A pair of animatable values, which is itself animatable.

```
@frozen struct AnimatablePair<First, Second> where First : VectorArithmetic, Second : VectorArithmetic
```

## Topics

### Creating an animatable pair

[`init(_:_:)`](/documentation/SwiftUI/AnimatablePair/init(_:_:))

Creates an animated pair with the provided values.

### Getting the constituent animations

[`first`](/documentation/SwiftUI/AnimatablePair/first)

The first value.

[`second`](/documentation/SwiftUI/AnimatablePair/second)

The second value.

### Manipulating values

[`magnitudeSquared`](/documentation/SwiftUI/AnimatablePair/magnitudeSquared)

The dot-product of this animated pair with itself.



---

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)