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


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


<h2 id="veilout-animationspec-targetcolor-matchparentsize">veilOut</h2>

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


```kotlin
@ExperimentalAnimationApi
public fun veilOut(
    animationSpec: FiniteAnimationSpec<Color> = spring(stiffness = Spring.StiffnessMediumLow),
    targetColor: Color = Color.Black.copy(alpha = 0.5f),
    matchParentSize: Boolean = false,
): ExitTransition
```


This animates a veiling scrim over the content as it exits.

#### Parameters

| | |
| --- | --- |
| animationSpec | the animation used for the scrim, `spring` by default. |
| targetColor | the target color of the scrim. |
| matchParentSize | whether the scrim should match the parent size. When `matchParentSize` is true, the veil is applied independently from all other transforms and matches the parent size. When `matchParentSize` is false, the veil is applied first and thus is affected by other transforms. Note: The veil may be clipped if a clip modifier is used on the same layout as the ExitTransition, even when `matchParentSize` is true. |