RenderText

fun RenderText(modifier: Modifier = Modifier, text: Any, color: Color = MaterialTheme.colorScheme.onSurface, fontWeight: FontWeight? = null, textAlign: TextAlign = TextAlign.Start, fontStyle: FontStyle? = null, textDecoration: TextDecoration = TextDecoration.None, style: TextStyle = MaterialTheme.typography.bodyLarge, maxLines: Int = Int.MAX_VALUE, overflow: TextOverflow = TextOverflow.Ellipsis, onTextLayout: (TextLayoutResult) -> Unit = {})

Base Text component that uses the Material3 typography system.

Parameters

modifier

Modifier to be applied to the text

text

Text to display. Can be String, Int or AnnotatedString

color

Text color

fontWeight

Font weight

textAlign

Text alignment

style

Text style

maxLines

Maximum number of lines to display

overflow

Text overflow behavior

onTextLayout

Text layout callback

See also

KwikText's functions like DisplayLarge, DisplayMedium, BodyMedium etc... rely on it to display text.