# androidx.compose.ui.text.style

Common/AllAndroid/JVM

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift` | Shifts the text baseline vertically (up or down). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens` | Automatically hyphenates words when wrapping text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak` | Configures line breaking behavior when text wraps automatically to fit its container. | Cmn android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak.Strategy` | The strategy used for line breaking. | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak.Strictness` | Describes the strictness of line breaking, determining before which characters line breaks can be inserted. | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak.WordBreak` | Describes how line breaks should be inserted within words. | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle` | Configures line height behavior, including alignment and trimming of extra space. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Alignment` | Aligns the line within the space provided by the line height. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Mode` | Determines how line height is calculated across lines in a paragraph. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Trim` | Controls trimming of extra space from the first line top and last line bottom. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign` | Aligns text horizontally within its container. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration` | Defines text decorations such as underline or line-through. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` | Defines the algorithm used to determine text direction. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform` | Defines geometric transformations for text (such as scaling and skewing). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent` | Indents paragraph lines. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextMotion` | Configures glyph rendering and placement for readability or smooth animations. | Cmn android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow` | Specifies how to handle overflowing text. | Cmn |

## Enums

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/ResolvedTextDirection` | Describes the directionality of a text. | Cmn |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.BaselineShift,kotlin.Float)(start: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift, stop: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift, fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Linearly interpolate two `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift`s. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.style.TextGeometricTransform,kotlin.Float)( start: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform, stop: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextGeometricTransform, fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)(start: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent, stop: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent, fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Linearly interpolate between two `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent`s. | Cmn |

## Extension functions summary

|---|---|---|
| `inline https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.BaselineShift).takeOrElse(kotlin.Function0)(block: () -> https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift)` If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.BaselineShift).takeOrElse(kotlin.Function0)` is executed and its result is returned. | Cmn |
| `inline https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.Hyphens).takeOrElse(kotlin.Function0)(block: () -> https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens)` If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.Hyphens).takeOrElse(kotlin.Function0)` is executed and its result is returned. | Cmn |
| `inline https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextAlign).takeOrElse(kotlin.Function0)(block: () -> https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign)` If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextAlign).takeOrElse(kotlin.Function0)` is executed and its result is returned. | Cmn |
| `inline https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextDirection).takeOrElse(kotlin.Function0)(block: () -> https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection)` If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextDirection).takeOrElse(kotlin.Function0)` is executed and its result is returned. | Cmn |

## Extension properties summary

|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.BaselineShift).isSpecified()` Returns `true` if this baseline shift is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift#Unspecified()`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.Hyphens).isSpecified()` Returns `true` if it is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens#Unspecified()`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.LineBreak).isSpecified()` Returns `true` if it is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak#Unspecified()`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextAlign).isSpecified()` Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign` is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign#Unspecified()`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextDirection).isSpecified()` Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection#Unspecified()`. | Cmn |

## Top-level functions

### lerp

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/BaselineShift.kt+function:lerp) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun lerp(start: BaselineShift, stop: BaselineShift, fraction: Float): BaselineShift
```

Linearly interpolate two `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift`s.

### lerp

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/TextGeometricTransform.kt+function:lerp) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun lerp(
    start: TextGeometricTransform,
    stop: TextGeometricTransform,
    fraction: Float
): TextGeometricTransform
```

### lerp

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/TextIndent.kt+function:lerp) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun lerp(start: TextIndent, stop: TextIndent, fraction: Float): TextIndent
```

Linearly interpolate between two `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextIndent`s.

The `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)` argument represents position on the timeline, with 0.0 meaning that the interpolation has not started, returning `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)` (or something equivalent to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)`), 1.0 meaning that the interpolation has finished, returning `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)` (or something equivalent to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)`), and values in between meaning that the interpolation is at the relevant point on the timeline between `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#lerp(androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.style.TextIndent,kotlin.Float)`. The interpolation can be extrapolated beyond 0.0 and 1.0, so negative values and values greater than 1.0 are valid.

## Extension functions

### BaselineShift.takeOrElse

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/BaselineShift.kt+function:takeOrElse) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
inline fun BaselineShift.takeOrElse(block: () -> BaselineShift): BaselineShift
```

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.BaselineShift).takeOrElse(kotlin.Function0)` is executed and its result is returned.

### Hyphens.takeOrElse

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/Hyphens.kt+function:takeOrElse) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
inline fun Hyphens.takeOrElse(block: () -> Hyphens): Hyphens
```

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.Hyphens).takeOrElse(kotlin.Function0)` is executed and its result is returned.

### TextAlign.takeOrElse

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/TextAlign.kt+function:takeOrElse) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
inline fun TextAlign.takeOrElse(block: () -> TextAlign): TextAlign
```

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextAlign).takeOrElse(kotlin.Function0)` is executed and its result is returned.

### TextDirection.takeOrElse

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/TextDirection.kt+function:takeOrElse) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
inline fun TextDirection.takeOrElse(block: () -> TextDirection): TextDirection
```

If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.Color).isSpecified()` is true then this is returned, otherwise `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/package-summary#(androidx.compose.ui.text.style.TextDirection).takeOrElse(kotlin.Function0)` is executed and its result is returned.

## Extension properties

### BaselineShift.isSpecified

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/BaselineShift.kt+symbol:isSpecified)

```
val BaselineShift.isSpecified: Boolean
```

Returns `true` if this baseline shift is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift#Unspecified()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/BaselineShift#Unspecified()` |   |

### Hyphens.isSpecified

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/Hyphens.kt+symbol:isSpecified)

```
val Hyphens.isSpecified: Boolean
```

Returns `true` if it is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens#Unspecified()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/Hyphens#Unspecified()` |   |

### LineBreak.isSpecified

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/LineBreak.kt+symbol:isSpecified)

```
val LineBreak.isSpecified: Boolean
```

Returns `true` if it is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak#Unspecified()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineBreak#Unspecified()` |   |

### TextAlign.isSpecified

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/TextAlign.kt+symbol:isSpecified)

```
val TextAlign.isSpecified: Boolean
```

Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign` is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign#Unspecified()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign#Unspecified()` |   |

### TextDirection.isSpecified

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/style/TextDirection.kt+symbol:isSpecified)

```
val TextDirection.isSpecified: Boolean
```

Returns `true` if this `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection` is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection#Unspecified()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection#Unspecified()` |   |