AppExpandableText

fun AppExpandableText(text: String, modifier: Modifier = Modifier, maxLines: Int = 3, expandText: StringResource = Res.string.action_more, expandTextColor: Color = MaterialTheme.colorScheme.primary, collapseText: StringResource = Res.string.action_less, collapseTextColor: Color = MaterialTheme.colorScheme.primary, textAlign: TextAlign = TextAlign.Start, testTag: String = AppExpandableTextTags.TEXT_CONTAINER)

A text component that truncates long text and provides a "More" link to expand it.

Parameters

text

The full text to be displayed.

modifier

The modifier to be applied to the layout.

maxLines

The maximum number of lines to show when collapsed.

expandText

The StringResource to show for the expansion link.

expandTextColor

The color of the expansion link.

collapseText

The StringResource to show for the collapse link.

collapseTextColor

The color of the collapse link.

textAlign

The alignment of the text.

testTag

Optional tag for testing identification.