Start native apps faster with the Composables CLI ->
Object

TabRowDefaults

Contains default implementations and values used for TabRow.

Source set: Common
public object TabRowDefaults

Contains default implementations and values used for TabRow.

Properties

ScrollableTabRowMinTabWidth

Source set: Common
public val ScrollableTabRowMinTabWidth: Dp = 90.dp

The default minimum width for a tab in a PrimaryScrollableTabRow or SecondaryScrollableTabRow.

ScrollableTabRowEdgeStartPadding

Source set: Common
public val ScrollableTabRowEdgeStartPadding: Dp = 52.dp

The default padding from the starting edge before a tab in a PrimaryScrollableTabRow or SecondaryScrollableTabRow.

containerColor

Source set: Common
@Deprecated(
        message = "Use TabRowDefaults.primaryContainerColor instead",
        replaceWith = ReplaceWith("primaryContainerColor"),
    )
    public val containerColor: Color

Default container color of a tab row.

primaryContainerColor

Source set: Common
public val primaryContainerColor: Color

Default container color of a PrimaryTabRow.

secondaryContainerColor

Source set: Common
public val secondaryContainerColor: Color

Default container color of a SecondaryTabRow.

contentColor

Source set: Common
@Deprecated(
        message = "Use TabRowDefaults.primaryContentColor instead",
        replaceWith = ReplaceWith("primaryContentColor"),
    )
    public val contentColor: Color

Default content color of a tab row.

primaryContentColor

Source set: Common
public val primaryContentColor: Color

Default content color of a PrimaryTabRow.

secondaryContentColor

Source set: Common
public val secondaryContentColor: Color

Default content color of a SecondaryTabRow.

Functions

Indicator

Source set: Common
@Composable
    @Deprecated(
        message = "Use SecondaryIndicator instead.",
        replaceWith = ReplaceWith("SecondaryIndicator(modifier, height, color)"),
    )
    public 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.

Parameters

modifier modifier for the indicator's layout
height height of the indicator
color color of the indicator

PrimaryIndicator

Source set: Common
@Composable
    public 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.

Parameters

modifier modifier for the indicator's layout
width width of the indicator
height height of the indicator
color color of the indicator
shape shape of the indicator

SecondaryIndicator

Source set: Common
@Composable
    public 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.

Parameters

modifier modifier for the indicator's layout
height height of the indicator
color color of the indicator

tabIndicatorOffset

Source set: Common
@Deprecated(
        level = DeprecationLevel.WARNING,
        message =
            "Solely for use alongside deprecated TabRowDefaults.Indicator method. For " +
                "recommended PrimaryIndicator and SecondaryIndicator methods, please use " +
                "TabIndicatorScope.tabIndicatorOffset method.",
    )
    public 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.

Parameters

currentTabPosition TabPosition of the currently selected tab. This is used to calculate the offset of the indicator this modifier is applied to, as well as its width.