iconText

abstract fun iconText(icon: SparkIcon, text: String, selected: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier): SegmentedButtonItem(source)

Segment showing a medium-sized SparkIcon above a single line of text.

Icon + text segment

The icon colour animates between com.adevinta.spark.tokens.SparkColors.support when unselected and com.adevinta.spark.tokens.SparkColors.supportVariant when selected. The text uses the same animated style as singleLine.

Parameters

icon

Icon rendered above the label.

text

Label displayed below the icon, truncated with ellipsis.

selected

Whether this segment is currently selected.

onClick

Called when the user taps this segment.

modifier

Modifier applied to this segment's touch-target box.