Object

TabRowDefaults

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
object TabRowDefaults

Properties

Android
val ContainerColor = Color.Transparent

Color of the background of a tab

Functions

TabSeparator

@Composable
    fun TabSeparator()

Space between tabs in the tab row

@Composable fun contentColor(): Color

Default accent color for the TabRow


PillIndicator

@Composable
    fun PillIndicator(
        currentTabPosition: DpRect,
        doesTabRowHaveFocus: Boolean,
        modifier: Modifier = Modifier,
        activeColor: Color = MaterialTheme.colorScheme.onSurface,
        inactiveColor: Color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.4f),
    )

Adds a pill indicator behind the tab

Parameters

currentTabPosition position of the current selected tab
doesTabRowHaveFocus whether any tab in TabRow is focused
modifier modifier to be applied to the indicator
activeColor color of indicator when TabRow is active
inactiveColor color of indicator when TabRow is inactive

UnderlinedIndicator

@Composable
    fun UnderlinedIndicator(
        currentTabPosition: DpRect,
        doesTabRowHaveFocus: Boolean,
        modifier: Modifier = Modifier,
        activeColor: Color = MaterialTheme.colorScheme.primary,
        inactiveColor: Color = MaterialTheme.colorScheme.secondary,
    )

Adds an underlined indicator below the tab

Parameters

currentTabPosition position of the current selected tab
doesTabRowHaveFocus whether any tab in TabRow is focused
modifier modifier to be applied to the indicator
activeColor color of indicator when TabRow is active
inactiveColor color of indicator when TabRow is inactive