Texty

fun Texty(text: String, displayStyle: DisplayStyle = DisplayStyle.Basic(), modifier: Modifier = Modifier, textStyle: TextStyle = TextStyle.Default, onTextLayout: (TextLayoutResult) -> Unit? = null, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, color: ColorProducer? = null)(source)

Displays text with various display styles, including normal, list, and utility styles.

Built on top of Compose Foundation, this composable extends BasicText with additional display capabilities such as typing effects, animations, and other unique text behaviors.

Parameters

text

The text to be displayed.

displayStyle

The display style to be applied to the text. Defaults to DisplayStyle.Basic.

modifier

Modifier used to adjust the composable's appearance and layout behavior.

textStyle

Specifies the style of the text, including font size, weight, and color. Defaults to TextStyle.Default.

onTextLayout

Callback invoked with the TextLayoutResult when the text is measured and laid out. Useful for observing text measurements and layout details.

overflow

How to handle text overflow when content exceeds the available space. Uses TextOverflow.Clip by default.

softWrap

Determines if the text should wrap at line breaks. Defaults to true, consistent with Compose behavior.

maxLines

The maximum number of lines allowed for the text. Defaults to unlimited lines.

minLines

The minimum number of lines required for the text layout, even if less content is present.

color

Optional ColorProducer to dynamically set the text color, aligning with Compose’s color configuration.


fun Texty(textList: List<String>, displayStyle: ListDisplayStyle, modifier: Modifier = Modifier, textStyle: TextStyle = TextStyle.Default, onTextLayout: (TextLayoutResult) -> Unit? = null, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, color: ColorProducer? = null)(source)

Displays a list of texts with various display styles.

Parameters

textList

A list of strings to be displayed.

displayStyle

The display style to be applied to the list of text.

modifier

Modifier applied to adjust the composable's appearance and layout behavior.

textStyle

The style to apply to the displayed text, including font and color configurations.

onTextLayout

Callback invoked with the layout results when the text is measured and laid out.

overflow

Specifies how text content behaves when exceeding the available space.

softWrap

If true, text wraps at soft line breaks. Defaults to true.

maxLines

The maximum number of lines allowed for the text. Defaults to unlimited.

minLines

The minimum number of lines required for the text layout.

color

Optional ColorProducer for dynamically setting the text color.


fun Texty(utility: Utility, modifier: Modifier = Modifier, textStyle: TextStyle = TextStyle.Default, onTextLayout: (TextLayoutResult) -> Unit? = null, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, color: ColorProducer? = null)(source)

Displays utility-based text styles, such as loading and timekeeping.

Parameters

utility

The utility to apply.

modifier

Modifier applied to adjust the composable's appearance and layout behavior.

textStyle

The style to apply to the displayed text, including font and color configurations.

onTextLayout

Callback invoked with the layout results when the text is measured and laid out.

overflow

Specifies how text content behaves when exceeding the available space.

softWrap

If true, text wraps at soft line breaks. Defaults to true.

maxLines

The maximum number of lines allowed for the text. Defaults to unlimited.

minLines

The minimum number of lines required for the text layout.

color

Optional ColorProducer for dynamically setting the text color.