---
title: "heightIn"
description: "Constrain the height of the content to be between [min]dp and [max]dp as permitted by the
incoming measurement [Constraints]. If the incoming constraints are more restrictive the
requested size will obey the incoming constraints and attempt to be as close as possible to the
preferred size."
type: "modifier"
---

<div class='type'>Compose Modifier</div>

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


```kotlin
fun Modifier.heightIn(min: Dp = Dp.Unspecified, max: Dp = Dp.Unspecified) =
    this.then(
        SizeElement(
            minHeight = min,
            maxHeight = max,
            enforceIncoming = true,
            inspectorInfo =
                debugInspectorInfo {
                    name = "heightIn"
                    properties["min"] = min
                    properties["max"] = max
                },
        )
    )
```


Constrain the height of the content to be between `min`dp and `max`dp as permitted by the
incoming measurement `Constraints`. If the incoming constraints are more restrictive the
requested size will obey the incoming constraints and attempt to be as close as possible to the
preferred size.



