---
title: CubicKeyframe
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/cubickeyframe
---

# CubicKeyframe

A keyframe that uses a cubic curve to smoothly interpolate between values.

## Declaration

```swift
struct CubicKeyframe<Value> where Value : Animatable
```

## Overview

Overview If you don’t specify a start or end velocity, SwiftUI automatically computes a curve that maintains smooth motion between keyframes. Adjacent cubic keyframes result in a Catmull-Rom spline. If a cubic keyframe follows a different type of keyframe, such as a linear keyframe, the end velocity of the segment defined by the previous keyframe will be used as the starting velocity. Likewise, if a cubic keyframe is followed by a different type of keyframe, the initial velocity of the next segment is used as the end velocity of the segment defined by this keyframe.

## Topics

### Creating the keyframe

- [init(_:duration:startVelocity:endVelocity:)](swiftui/cubickeyframe/init(_:duration:startvelocity:endvelocity:).md)

## Relationships

### Conforms To

- [KeyframeTrackContent](swiftui/keyframetrackcontent.md)

## See Also

### Creating keyframe-based animation

- [keyframeAnimator(initialValue:repeating:content:keyframes:)](swiftui/view/keyframeanimator(initialvalue:repeating:content:keyframes:).md)
- [keyframeAnimator(initialValue:trigger:content:keyframes:)](swiftui/view/keyframeanimator(initialvalue:trigger:content:keyframes:).md)
- [KeyframeAnimator](swiftui/keyframeanimator.md)
- [Keyframes](swiftui/keyframes.md)
- [KeyframeTimeline](swiftui/keyframetimeline.md)
- [KeyframeTrack](swiftui/keyframetrack.md)
- [KeyframeTrackContentBuilder](swiftui/keyframetrackcontentbuilder.md)
- [KeyframesBuilder](swiftui/keyframesbuilder.md)
- [KeyframeTrackContent](swiftui/keyframetrackcontent.md)
- [LinearKeyframe](swiftui/linearkeyframe.md)
- [MoveKeyframe](swiftui/movekeyframe.md)
- [SpringKeyframe](swiftui/springkeyframe.md)
