---
title: "ArcAnimationSpec"
description: "[DurationBasedAnimationSpec] that interpolates 2-dimensional values using arcs of quarter of an
Ellipse.

To interpolate with [keyframes] use [KeyframesSpecConfig.using] with an [ArcMode].

&nbsp;

As such, it's recommended that [ArcAnimationSpec] is only used for positional values such as:
[Offset], [IntOffset] or [androidx.compose.ui.unit.DpOffset].

&nbsp;

The orientation of the arc is indicated by the given [mode].

Do note, that if the target value being animated only changes in one dimension, you'll only be
able to get a linear curve.

Similarly, one-dimensional values will always only interpolate on a linear curve."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@ExperimentalAnimationSpecApi
public class ArcAnimationSpec<T>(
    public val mode: ArcMode = ArcBelow,
    public val durationMillis: Int = DefaultDurationMillis,
    public val delayMillis: Int = 0,
    public val easing: Easing = FastOutSlowInEasing, // Same default as tween()
) : DurationBasedAnimationSpec<T>
```


`DurationBasedAnimationSpec` that interpolates 2-dimensional values using arcs of quarter of an
Ellipse.

To interpolate with `keyframes` use `KeyframesSpecConfig.using` with an `ArcMode`.

&nbsp;

As such, it's recommended that `ArcAnimationSpec` is only used for positional values such as:
`Offset`, `IntOffset` or `androidx.compose.ui.unit.DpOffset`.

&nbsp;

The orientation of the arc is indicated by the given `mode`.

Do note, that if the target value being animated only changes in one dimension, you'll only be
able to get a linear curve.

Similarly, one-dimensional values will always only interpolate on a linear curve.

#### Parameters

| | |
| --- | --- |
| mode | Orientation of the arc. |
| durationMillis | Duration of the animation. `DefaultDurationMillis` by default. |
| delayMillis | Time the animation waits before starting. 0 by default. |
| easing | `Easing` applied on the animation curve. `FastOutSlowInEasing` by default. |




## Code Examples

### OffsetArcAnimationSpec
```kotlin
fun OffsetArcAnimationSpec() {
    // Will interpolate the Offset in arcs such that the curve of the quarter of an Ellipse is above
    // the center.
    ArcAnimationSpec<Offset>(mode = ArcAbove)
}
```

