---
title: environment
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/animationcontext/environment
---

# environment

The current environment of the view that created the custom animation.

## Declaration

```swift
var environment: EnvironmentValues { get }
```

## Discussion

Discussion An instance of CustomAnimation uses this property to read environment values from the view that created the animation. To learn more about environment values including how to define custom environment values, see EnvironmentValues.
