TabRowDefaults

Contains default implementations and values used for TabRow.

Properties

Link copied to clipboard
@get:Composable
val containerColor: Color

Default container color of a tab row.

Link copied to clipboard
@get:Composable
val contentColor: Color

Default content color of a tab row.

Link copied to clipboard
@get:Composable
val primaryContainerColor: Color

Default container color of a PrimaryTabRow.

Link copied to clipboard
@get:Composable
val primaryContentColor: Color

Default content color of a PrimaryTabRow.

Link copied to clipboard

The default padding from the starting edge before a tab in a ScrollableTabRow.

Link copied to clipboard
@get:Composable
val secondaryContainerColor: Color

Default container color of a SecondaryTabRow.

Link copied to clipboard
@get:Composable
val secondaryContentColor: Color

Default content color of a SecondaryTabRow.

Functions

Link copied to clipboard
@Composable
fun Indicator(modifier: Modifier = Modifier, height: Dp = PrimaryNavigationTabTokens.ActiveIndicatorHeight, color: Color = MaterialTheme.colorScheme.fromToken(PrimaryNavigationTabTokens.ActiveIndicatorColor))

Default indicator, which will be positioned at the bottom of the TabRow, on top of the divider.

Link copied to clipboard
@Composable
fun PrimaryIndicator(modifier: Modifier = Modifier, width: Dp = 24.dp, height: Dp = PrimaryNavigationTabTokens.ActiveIndicatorHeight, color: Color = PrimaryNavigationTabTokens.ActiveIndicatorColor.value, shape: Shape = PrimaryNavigationTabTokens.ActiveIndicatorShape)

Primary indicator, which will be positioned at the bottom of the TabRow, on top of the divider.

Link copied to clipboard
@Composable
fun SecondaryIndicator(modifier: Modifier = Modifier, height: Dp = PrimaryNavigationTabTokens.ActiveIndicatorHeight, color: Color = PrimaryNavigationTabTokens.ActiveIndicatorColor.value)

Secondary indicator, which will be positioned at the bottom of the TabRow, on top of the divider.

Link copied to clipboard
fun Modifier.tabIndicatorOffset(currentTabPosition: TabPosition): Modifier

Modifier that takes up all the available width inside the TabRow, and then animates the offset of the indicator it is applied to, depending on the currentTabPosition.