The text field will be at least minHeightInLines tall, if the text overflows it will wrap, and if the text ends up being more than one line the field will grow until it is maxHeightInLines tall and then start scrolling vertically.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# TextFieldLineLimits.MultiLine\n=============================\n\nArtifact: [androidx.compose.foundation:foundation](/jetpack/androidx/releases/compose-foundation) \n[View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/text/input/TextFieldLineLimits.kt+class:androidx.compose.foundation.text.input.TextFieldLineLimits.MultiLine) \nAdded in [1.7.0](/jetpack/androidx/releases/compose-foundation#1.7.0)\nCommon/All\n - Cmn \n\n ```\n class TextFieldLineLimits.MultiLine : TextFieldLineLimits\n ```\n\n*** ** * ** ***\n\nThe text field will be at least [minHeightInLines](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#minHeightInLines()) tall, if the text overflows it will wrap, and if the text ends up being more than one line the field will grow until it is [maxHeightInLines](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#maxHeightInLines()) tall and then start scrolling vertically.\n\nIt is required that 1 ≤ [minHeightInLines](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#minHeightInLines()) ≤ [maxHeightInLines](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#maxHeightInLines()).\n\nTo specify the minimum and/or maximum height of the field in non-text units, such as dps, use the [heightIn](/reference/kotlin/androidx/compose/foundation/layout/package-summary#(androidx.compose.ui.Modifier).heightIn(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)) modifier.\n\nSummary\n-------\n\n| ### Public constructors |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|\n| [MultiLine](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#MultiLine(kotlin.Int,kotlin.Int))`(minHeightInLines: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, maxHeightInLines: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` | Cmn |\n\n| ### Public functions |\n|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|\n| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` | Cmn |\n| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [hashCode](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#hashCode())`()` | Cmn |\n| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | [toString](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#toString())`()` | Cmn |\n\n| ### Public properties |\n|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|-----|\n| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [maxHeightInLines](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#maxHeightInLines()) | Cmn |\n| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [minHeightInLines](/reference/kotlin/androidx/compose/foundation/text/input/TextFieldLineLimits.MultiLine#minHeightInLines()) | Cmn |\n\nPublic constructors\n-------------------\n\n### MultiLine\n\nCmn \nAdded in [1.7.0](/jetpack/androidx/releases/compose-foundation#1.7.0) \n\n```\nMultiLine(minHeightInLines: Int = 1, maxHeightInLines: Int = Int.MAX_VALUE)\n```\n\nPublic functions\n----------------\n\n### equals\n\nCmn \n\n```\nopen operator fun equals(other: Any?): Boolean\n``` \n\n### hashCode\n\nCmn \n\n```\nopen fun hashCode(): Int\n``` \n\n### toString\n\nCmn \n\n```\nopen fun toString(): String\n```\n\nPublic properties\n-----------------\n\n### maxHeightInLines\n\nCmn \nAdded in [1.7.0](/jetpack/androidx/releases/compose-foundation#1.7.0) \n\n```\nval maxHeightInLines: Int\n``` \n\n### minHeightInLines\n\nCmn \nAdded in [1.7.0](/jetpack/androidx/releases/compose-foundation#1.7.0) \n\n```\nval minHeightInLines: Int\n```"]]