LeadingIconTab
LeadingIconTab without ripple
Tabs organize content across different screens, data sets, and other interactions.
A LeadingIconTab represents a single page of content using a text label, and an icon in front of the label. It represents its selected state by tinting the text label and icon with selectedContentColor.
This should typically be used inside a TabRow.
LeadingIconTab(
selected = index == pagerState.currentPage,
text = {
Text(text = text, color = tabTextColor)
},
icon = {
Icon(imageVector = Icons.AutoMirrored.Filled.Send, contentDescription = null)
},
onClick = {
coroutineScope.launch {
pagerState.animateScrollToPage(index)
}
}
)
Parameters
whether this tab is selected or not
the callback to be invoked when this tab is selected
the text label displayed in this tab
the icon displayed in this tab
optional Modifier for this tab
Defines the tab's shape.
controls the enabled state of this tab. When false
, this tab will not be clickable and will appear disabled to accessibility services.
the color for the content of this tab when selected, and the color of the ripple.
the color for the content of this tab when not selected