---
title: "DpTouchBoundsExpansion"
description: "Describes the expansion of a [PointerInputModifierNode]'s touch bounds along each edges using
[Dp] for units. See [DpTouchBoundsExpansion] factories and [Absolute] for convenient ways to
build [DpTouchBoundsExpansion]."
type: "class"
---

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


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

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


```kotlin
data class DpTouchBoundsExpansion(
    val start: Dp,
    val top: Dp,
    val end: Dp,
    val bottom: Dp,
    val isLayoutDirectionAware: Boolean,
)
```


Describes the expansion of a `PointerInputModifierNode`'s touch bounds along each edges using
`Dp` for units. See `DpTouchBoundsExpansion` factories and `Absolute` for convenient ways to
build `DpTouchBoundsExpansion`.


## Functions

```kotlin
fun roundToTouchBoundsExpansion(density: Density) =
        with(density) {
            TouchBoundsExpansion(
                packedValue =
                    TouchBoundsExpansion.pack(
                        start.roundToPx(),
                        top.roundToPx(),
                        end.roundToPx(),
                        bottom.roundToPx(),
                        isLayoutDirectionAware,
                    )
            )
        }
```

## Companion Object

#### Methods

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


```kotlin
fun Absolute(
            left: Dp = 0.dp,
            top: Dp = 0.dp,
            right: Dp = 0.dp,
            bottom: Dp = 0.dp,
        ): DpTouchBoundsExpansion
```


Creates a `DpTouchBoundsExpansion` that's unaware of `LayoutDirection`. The `left`,
`top`, `right` and `bottom` represent the distance that the touch bounds is expanded
along the corresponding edge.





