---
title: defaultKey
framework: realitykit
role: symbol
role_heading: Instance Property
path: realitykit/animationlibrarycomponent/defaultkey
---

# defaultKey

The name of the default animation resource.

## Declaration

```swift
var defaultKey: String? { get set }
```

## Discussion

Discussion Returns nil if you don’t set a default animation, or if the component can’t find it.

## See Also

### Accessing animations

- [animations](realitykit/animationlibrarycomponent/animations.md)
- [unkeyedResources](realitykit/animationlibrarycomponent/unkeyedresources.md)
- [defaultAnimation](realitykit/animationlibrarycomponent/defaultanimation.md)
