---
title: defaultAnimation
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/animationlibrarycomponent/defaultanimation
---

# defaultAnimation

The default animation resource.

## Declaration

```swift
var defaultAnimation: AnimationResource? { get }
```

## Discussion

Discussion The component looks up the resource by key if defaultKey is non-nil and the library contains an animation that the key identifies. Otherwise, the component returns the first entry in the library.

## See Also

### Accessing animations

- [animations](realitykit/animationlibrarycomponent/animations.md)
- [unkeyedResources](realitykit/animationlibrarycomponent/unkeyedresources.md)
- [defaultKey](realitykit/animationlibrarycomponent/defaultkey.md)
