# Text

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/Text.composable#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)( text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize?, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign?, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow, softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, onTextLayout: ((https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` High level element that displays text and provides semantics / accessibility information. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/Text.composable#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)( text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize?, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign?, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow, softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, onTextLayout: ((https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` High level element that displays text and provides semantics / accessibility information. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/Text.composable#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)( text: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize?, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign?, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow, softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, inlineContent: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/InlineTextContent>, onTextLayout: (https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` High level element that displays text and provides semantics / accessibility information. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/Text.composable#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)( text: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize?, fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle?, fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight?, fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily?, letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign?, lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow, softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, inlineContent: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/InlineTextContent>, onTextLayout: (https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle )` High level element that displays text and provides semantics / accessibility information. | Cmn |

## Functions

### Text

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Text.kt+function:Text)

```
@Composable
fun Text(
    text: String,
    color: ColorProducer,
    modifier: Modifier = Modifier,
    autoSize: TextAutoSize? = null,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontStyle: FontStyle? = null,
    fontWeight: FontWeight? = null,
    fontFamily: FontFamily? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    textDecoration: TextDecoration? = null,
    textAlign: TextAlign? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    overflow: TextOverflow = TextOverflow.Clip,
    softWrap: Boolean = true,
    maxLines: Int = Int.MAX_VALUE,
    minLines: Int = 1,
    onTextLayout: ((TextLayoutResult) -> Unit)? = null,
    style: TextStyle = LocalTextStyle.current
): Unit
```

High level element that displays text and provides semantics / accessibility information.

The default `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` uses the `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()` provided by the `https://developer.android.com/reference/kotlin/androidx/compose/material3/MaterialTheme` / components. If you are setting your own style, you may want to consider first retrieving `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()`, and using `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` to keep any theme defined attributes, only modifying the specific attributes you want to override.

For ease of use, commonly used parameters from `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` are also present here. The order of precedence is as follows:

- If a parameter is explicitly set here (i.e, it is *not* `null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then this parameter will always be used.

- If a parameter is *not* set, (`null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then the corresponding value from `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` will be used instead.

| Parameters |
|---|---|
| `text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the text to be displayed |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer` that returns a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color`. Useful when providing a color value that changes frequently without needing to recompose. Overrides the text color provided in `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this layout node |
| `autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize? = null` | Enable auto sizing for this text composable. Finds the biggest font size that fits in the available space and lays the text out with this size. This performs multiple layout passes and can be slower than using a fixed font size. This takes precedence over sizes defined through `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize`. |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the size of glyphs to use when painting the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontSize()`. |
| `fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle? = null` | the typeface variant to use when drawing the letters (e.g., italic). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontStyle()`. |
| `fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight? = null` | the typeface thickness to use when painting the text (e.g., `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight#Bold()`). |
| `fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | the font family to be used when rendering the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontFamily()`. |
| `letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the amount of space to add between each letter. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#letterSpacing()`. |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | the decorations to paint on the text (e.g., an underline). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textDecoration()`. |
| `textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign? = null` | the alignment of the text within the lines of the paragraph. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textAlign()`. |
| `lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | line height for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` unit, e.g. SP or EM. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeight()`. |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | how visual overflow should be handled. |
| `softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` is false, `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and TextAlign may have unexpected effects. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated according to `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 1` | The minimum height in terms of minimum number of visible lines. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `onTextLayout: ((https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | callback that is executed when a new text layout is calculated. A `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text. |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = LocalTextStyle.current` | style configuration for the text such as color, font, line height etc. |

### Text

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Text.kt+function:Text)

```
@Composable
fun Text(
    text: String,
    modifier: Modifier = Modifier,
    color: Color = Color.Unspecified,
    autoSize: TextAutoSize? = null,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontStyle: FontStyle? = null,
    fontWeight: FontWeight? = null,
    fontFamily: FontFamily? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    textDecoration: TextDecoration? = null,
    textAlign: TextAlign? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    overflow: TextOverflow = TextOverflow.Clip,
    softWrap: Boolean = true,
    maxLines: Int = Int.MAX_VALUE,
    minLines: Int = 1,
    onTextLayout: ((TextLayoutResult) -> Unit)? = null,
    style: TextStyle = LocalTextStyle.current
): Unit
```

High level element that displays text and provides semantics / accessibility information.

The default `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` uses the `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()` provided by the `https://developer.android.com/reference/kotlin/androidx/compose/material3/MaterialTheme` / components. If you are setting your own style, you may want to consider first retrieving `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()`, and using `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` to keep any theme defined attributes, only modifying the specific attributes you want to override.

For ease of use, commonly used parameters from `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` are also present here. The order of precedence is as follows:

- If a parameter is explicitly set here (i.e, it is *not* `null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then this parameter will always be used.

- If a parameter is *not* set, (`null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then the corresponding value from `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` will be used instead.

Additionally, for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`, if `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` is not set, and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` does not have a color, then `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalContentColor()` will be used.

| Parameters |
|---|---|
| `text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the text to be displayed |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this layout node |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` to apply to the text. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()`, and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` has no color set, this will be `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalContentColor()`. |
| `autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize? = null` | Enable auto sizing for this text composable. Finds the biggest font size that fits in the available space and lays the text out with this size. This performs multiple layout passes and can be slower than using a fixed font size. This takes precedence over sizes defined through `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize`. |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the size of glyphs to use when painting the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontSize()`. |
| `fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle? = null` | the typeface variant to use when drawing the letters (e.g., italic). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontStyle()`. |
| `fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight? = null` | the typeface thickness to use when painting the text (e.g., `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight#Bold()`). |
| `fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | the font family to be used when rendering the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontFamily()`. |
| `letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the amount of space to add between each letter. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#letterSpacing()`. |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | the decorations to paint on the text (e.g., an underline). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textDecoration()`. |
| `textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign? = null` | the alignment of the text within the lines of the paragraph. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textAlign()`. |
| `lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | line height for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` unit, e.g. SP or EM. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeight()`. |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | how visual overflow should be handled. |
| `softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` is false, `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and TextAlign may have unexpected effects. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated according to `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 1` | The minimum height in terms of minimum number of visible lines. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(kotlin.String,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `onTextLayout: ((https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)? = null` | callback that is executed when a new text layout is calculated. A `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text. |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = LocalTextStyle.current` | style configuration for the text such as color, font, line height etc. |

### Text

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Text.kt+function:Text)

```
@Composable
fun Text(
    text: AnnotatedString,
    color: ColorProducer,
    modifier: Modifier = Modifier,
    autoSize: TextAutoSize? = null,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontStyle: FontStyle? = null,
    fontWeight: FontWeight? = null,
    fontFamily: FontFamily? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    textDecoration: TextDecoration? = null,
    textAlign: TextAlign? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    overflow: TextOverflow = TextOverflow.Clip,
    softWrap: Boolean = true,
    maxLines: Int = Int.MAX_VALUE,
    minLines: Int = 1,
    inlineContent: Map<String, InlineTextContent> = mapOf(),
    onTextLayout: (TextLayoutResult) -> Unit = {},
    style: TextStyle = LocalTextStyle.current
): Unit
```

High level element that displays text and provides semantics / accessibility information.

The default `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` uses the `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()` provided by the `https://developer.android.com/reference/kotlin/androidx/compose/material3/MaterialTheme` / components. If you are setting your own style, you may want to consider first retrieving `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()`, and using `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` to keep any theme defined attributes, only modifying the specific attributes you want to override.

For ease of use, commonly used parameters from `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` are also present here. The order of precedence is as follows:

- If a parameter is explicitly set here (i.e, it is *not* `null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then this parameter will always be used.

- If a parameter is *not* set, (`null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then the corresponding value from `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` will be used instead.

See an example of displaying text with links where links apply the styling from the theme:

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.text.LinkAnnotation
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withLink

val url = "https://developer.android.com/jetpack/compose"
val annotatedString = buildAnnotatedString {
    append("Build better apps faster with ")
    // If the annotation's TextLinkStyles is null,
    // then the link style defaults to Material styling.
    withLink(LinkAnnotation.Url(url = url)) { append("Jetpack Compose") }
}
Text(annotatedString)
```

| Parameters |
|---|---|
| `text: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | the text to be displayed |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorProducer` that returns a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color`. Useful when providing a color value that changes frequently without needing to recompose. Overrides the text color provided in `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this layout node |
| `autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize? = null` | Enable auto sizing for this text composable. Finds the biggest font size that fits in the available space and lays the text out with this size. This performs multiple layout passes and can be slower than using a fixed font size. This takes precedence over sizes defined through `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize`. |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the size of glyphs to use when painting the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontSize()`. |
| `fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle? = null` | the typeface variant to use when drawing the letters (e.g., italic). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontStyle()`. |
| `fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight? = null` | the typeface thickness to use when painting the text (e.g., `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight#Bold()`). |
| `fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | the font family to be used when rendering the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontFamily()`. |
| `letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the amount of space to add between each letter. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#letterSpacing()`. |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | the decorations to paint on the text (e.g., an underline). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textDecoration()`. |
| `textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign? = null` | the alignment of the text within the lines of the paragraph. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textAlign()`. |
| `lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | line height for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` unit, e.g. SP or EM. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeight()`. |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | how visual overflow should be handled. |
| `softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` is false, `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and TextAlign may have unexpected effects. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated according to `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 1` | The minimum height in terms of minimum number of visible lines. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.graphics.ColorProducer,androidx.compose.ui.Modifier,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `inlineContent: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/InlineTextContent> = mapOf()` | a map storing composables that replaces certain ranges of the text, used to insert composables into text layout. See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/InlineTextContent`. |
| `onTextLayout: (https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | callback that is executed when a new text layout is calculated. A `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text. |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = LocalTextStyle.current` | style configuration for the text such as color, font, line height etc. |

### Text

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Text.kt+function:Text)

```
@Composable
fun Text(
    text: AnnotatedString,
    modifier: Modifier = Modifier,
    color: Color = Color.Unspecified,
    autoSize: TextAutoSize? = null,
    fontSize: TextUnit = TextUnit.Unspecified,
    fontStyle: FontStyle? = null,
    fontWeight: FontWeight? = null,
    fontFamily: FontFamily? = null,
    letterSpacing: TextUnit = TextUnit.Unspecified,
    textDecoration: TextDecoration? = null,
    textAlign: TextAlign? = null,
    lineHeight: TextUnit = TextUnit.Unspecified,
    overflow: TextOverflow = TextOverflow.Clip,
    softWrap: Boolean = true,
    maxLines: Int = Int.MAX_VALUE,
    minLines: Int = 1,
    inlineContent: Map<String, InlineTextContent> = mapOf(),
    onTextLayout: (TextLayoutResult) -> Unit = {},
    style: TextStyle = LocalTextStyle.current
): Unit
```

High level element that displays text and provides semantics / accessibility information.

The default `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` uses the `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()` provided by the `https://developer.android.com/reference/kotlin/androidx/compose/material3/MaterialTheme` / components. If you are setting your own style, you may want to consider first retrieving `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalTextStyle()`, and using `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#copy(androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontSynthesis,androidx.compose.ui.text.font.FontFamily,kotlin.String,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.BaselineShift,androidx.compose.ui.text.style.TextGeometricTransform,androidx.compose.ui.text.intl.LocaleList,androidx.compose.ui.graphics.Color,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.text.style.TextDirection,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextIndent,androidx.compose.ui.text.PlatformTextStyle,androidx.compose.ui.text.style.LineHeightStyle,androidx.compose.ui.text.style.LineBreak,androidx.compose.ui.text.style.Hyphens,androidx.compose.ui.text.style.TextMotion)` to keep any theme defined attributes, only modifying the specific attributes you want to override.

For ease of use, commonly used parameters from `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` are also present here. The order of precedence is as follows:

- If a parameter is explicitly set here (i.e, it is *not* `null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then this parameter will always be used.

- If a parameter is *not* set, (`null` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit#Unspecified()`), then the corresponding value from `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` will be used instead.

Additionally, for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`, if `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` is not set, and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` does not have a color, then `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalContentColor()` will be used.

See an example of displaying text with links where links apply the styling from the theme:

```kotlin
import androidx.compose.material3.Text
import androidx.compose.ui.text.LinkAnnotation
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.withLink

val url = "https://developer.android.com/jetpack/compose"
val annotatedString = buildAnnotatedString {
    append("Build better apps faster with ")
    // If the annotation's TextLinkStyles is null,
    // then the link style defaults to Material styling.
    withLink(LinkAnnotation.Url(url = url)) { append("Jetpack Compose") }
}
Text(annotatedString)
```

| Parameters |
|---|---|
| `text: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | the text to be displayed |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this layout node |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` to apply to the text. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()`, and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` has no color set, this will be `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalContentColor()`. |
| `autoSize: https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize? = null` | Enable auto sizing for this text composable. Finds the biggest font size that fits in the available space and lays the text out with this size. This performs multiple layout passes and can be slower than using a fixed font size. This takes precedence over sizes defined through `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/TextAutoSize`. |
| `fontSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the size of glyphs to use when painting the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontSize()`. |
| `fontStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontStyle? = null` | the typeface variant to use when drawing the letters (e.g., italic). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontStyle()`. |
| `fontWeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight? = null` | the typeface thickness to use when painting the text (e.g., `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontWeight#Bold()`). |
| `fontFamily: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/font/FontFamily? = null` | the font family to be used when rendering the text. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#fontFamily()`. |
| `letterSpacing: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | the amount of space to add between each letter. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#letterSpacing()`. |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | the decorations to paint on the text (e.g., an underline). See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textDecoration()`. |
| `textAlign: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign? = null` | the alignment of the text within the lines of the paragraph. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#textAlign()`. |
| `lineHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit = TextUnit.Unspecified` | line height for the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Paragraph` in `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` unit, e.g. SP or EM. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle#lineHeight()`. |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | how visual overflow should be handled. |
| `softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` is false, `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and TextAlign may have unexpected effects. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated according to `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `minLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 1` | The minimum height in terms of minimum number of visible lines. It is required that 1 \<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`\<= `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Text(androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.foundation.text.TextAutoSize,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.font.FontStyle,androidx.compose.ui.text.font.FontWeight,androidx.compose.ui.text.font.FontFamily,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.text.style.TextAlign,androidx.compose.ui.unit.TextUnit,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.Int,kotlin.collections.Map,kotlin.Function1,androidx.compose.ui.text.TextStyle)`. |
| `inlineContent: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/InlineTextContent> = mapOf()` | a map storing composables that replaces certain ranges of the text, used to insert composables into text layout. See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/InlineTextContent`. |
| `onTextLayout: (https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | callback that is executed when a new text layout is calculated. A `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` object that callback provides contains paragraph information, size of the text, baselines and other details. The callback can be used to add additional decoration or functionality to the text. For example, to draw selection around the text. |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = LocalTextStyle.current` | style configuration for the text such as color, font, line height etc. |