---
title: "WindowInsetsSides"
description: "[WindowInsetsSides] is used in [WindowInsets.only] to define which sides of the [WindowInsets]
should apply."
type: "class"
---

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


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

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


```kotlin
value class WindowInsetsSides private constructor(private val value: Int)
```


`WindowInsetsSides` is used in `WindowInsets.only` to define which sides of the `WindowInsets`
should apply.


## Functions

```kotlin
operator fun plus(sides: WindowInsetsSides): WindowInsetsSides
```


Returns a `WindowInsetsSides` containing sides defied in `sides` and the sides in `this`.


## Companion Object

#### Properties

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


```kotlin
val Start = AllowLeftInLtr + AllowRightInRtl
```


Indicates a `WindowInsets` start side, which is left or right depending on
`LayoutDirection`. If `LayoutDirection.Ltr`, `Start` is the left side. If
`LayoutDirection.Rtl`, `Start` is the right side.

Use `Left` or `Right` if the physical direction is required.



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


```kotlin
val End = AllowRightInLtr + AllowLeftInRtl
```


Indicates a `WindowInsets` end side, which is left or right depending on
`LayoutDirection`. If `LayoutDirection.Ltr`, `End` is the right side. If
`LayoutDirection.Rtl`, `End` is the left side.

Use `Left` or `Right` if the physical direction is required.



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


```kotlin
val Top = WindowInsetsSides(1 shl 4)
```


Indicates a `WindowInsets` top side.



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


```kotlin
val Bottom = WindowInsetsSides(1 shl 5)
```


Indicates a `WindowInsets` bottom side.



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


```kotlin
val Left = AllowLeftInLtr + AllowLeftInRtl
```


Indicates a `WindowInsets` left side. Most layouts will prefer using `Start` or `End` to
account for `LayoutDirection`.



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


```kotlin
val Right = AllowRightInLtr + AllowRightInRtl
```


Indicates a `WindowInsets` right side. Most layouts will prefer using `Start` or `End` to
account for `LayoutDirection`.



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


```kotlin
val Horizontal = Left + Right
```


Indicates a `WindowInsets` horizontal sides. This is a combination of `Left` and `Right`
sides, or `Start` and `End` sides.



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


```kotlin
val Vertical = Top + Bottom
```


Indicates a `WindowInsets` `Top` and `Bottom` sides.





