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

```kotlin
@JvmDefaultWithCompatibility
    public interface Segment<S>
```

[Segment](/jetpack-compose/androidx.compose.animation/animation-core/interfaces/Transition.Segment) holds `initialState` and `targetState`, which are the beginning and end of a
transition. These states will be used to obtain the animation spec that will be used for this
transition from the child animations.

## Functions

<h2 id="istransitioningto-targetstate">isTransitioningTo</h2>

```kotlin
public infix fun S.isTransitioningTo(targetState: S): Boolean
```

Returns whether the provided state matches the `initialState` && the provided
`targetState` matches [Segment.targetState](/jetpack-compose/androidx.compose.animation/animation-core/interfaces/Transition.Segment).