---
title: "subscript(componentType:)"
framework: realitykit
role: symbol
role_heading: Instance Subscript
path: "realitykit/entity/componentset/subscript(componenttype:)-3miek"
---

# subscript(componentType:)

## Declaration

```swift
@abi(@MainActor @preconcurrency subscript<T>(componentType: T.Type) -> T? where T : _ImplicitlyAnimatableBuiltinComponent { get set }) @MainActor @preconcurrency subscript<T>(componentType componentType: T.Type) -> T? where T : _ImplicitlyAnimatableBuiltinComponent { get set }
```

## See Also

### Accessing animatable components

- [subscript(_:_:)](realitykit/entity/componentset/subscript(_:_:)-b2gl.md)
- [subscript(withoutAnimation:)](realitykit/entity/componentset/subscript(withoutanimation:).md)
