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


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

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



```kotlin
public interface SizeTransform
```


`SizeTransform` defines how to transform from one size to another when the size of the content
changes. When `clip` is true, the content will be clipped to the animation size.
`createAnimationSpec` specifies the animation spec for the size animation based on the initial
and target size.


## Functions



<h2 id="createanimationspec-initialsize-targetsize">createAnimationSpec</h2>

```kotlin
public fun createAnimationSpec(
        initialSize: IntSize,
        targetSize: IntSize,
    ): FiniteAnimationSpec<IntSize>
```


This allows `FiniteAnimationSpec` to be defined based on the `initialSize` before the size
animation and the `targetSize` of the animation.