---
title: "WindowInsetsAnimation"
description: "Provides properties related to animating [WindowInsetsRulers]."
type: "interface"
---

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


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

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



```kotlin
sealed interface WindowInsetsAnimation
```


Provides properties related to animating `WindowInsetsRulers`.


## Properties

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


```kotlin
val source: RectRulers
```


The starting insets values of the animation when the insets are animating
(`WindowInsetsAnimation.isAnimating` is `true`). When the insets are not animating, no ruler
values will be provided.



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


```kotlin
val target: RectRulers
```


The ending insets values of the animation when the insets are animating
(`WindowInsetsAnimation.isAnimating` is `true`). When the insets are not animating, no ruler
values will be provided.



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


```kotlin
val isVisible: Boolean
```


True when the Window Insets are visible. For example, for `StatusBars`, when a status bar is
shown, `isVisible` will be `true`. When the status bar is hidden, `isVisible` will be
`false`. `isVisible` remains `true` during animations.



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


```kotlin
val isAnimating: Boolean
```


True when the Window Insets are currently being animated.



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


```kotlin
val fraction: Float
```


The current fraction of the animation if the Window Insets are being animated or `0` if
`isAnimating` is `false`. When animating, `fraction` typically ranges between `0` at the
start to `1` at the end, but it may go out of that range if an interpolator causes the
fraction to overshoot the range.



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


```kotlin
@get:IntRange(from = 0) val durationMillis: Long
```


The duration of the animation in milliseconds.



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


```kotlin
@get:FloatRange(from = 0.0, to = 1.0) val alpha: Float
```


The translucency of the animating window. This is used when Window Insets animate by fading
and can be used to have content match the fade.




