---
title: "only"
description: "Returns a [WindowInsets] that eliminates all dimensions except the ones that are enabled. For
example, to have a [WindowInsets] at the bottom of the screen, pass [WindowInsetsSides.Bottom]."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun WindowInsets.only(sides: WindowInsetsSides): WindowInsets
```


Returns a `WindowInsets` that eliminates all dimensions except the ones that are enabled. For
example, to have a `WindowInsets` at the bottom of the screen, pass `WindowInsetsSides.Bottom`.



