TabRowDefaults

object TabRowDefaults


Summary

Public functions

Unit
@Composable
PillIndicator(
    currentTabPosition: DpRect,
    doesTabRowHaveFocus: Boolean,
    modifier: Modifier,
    activeColor: Color,
    inactiveColor: Color
)

Adds a pill indicator behind the tab

Unit

Space between tabs in the tab row

Unit
@Composable
UnderlinedIndicator(
    currentTabPosition: DpRect,
    doesTabRowHaveFocus: Boolean,
    modifier: Modifier,
    activeColor: Color,
    inactiveColor: Color
)

Adds an underlined indicator below the tab

Color

Default accent color for the TabRow

Public properties

Color

Color of the background of a tab

Public functions

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)
): Unit

Adds a pill indicator behind the tab

Parameters
currentTabPosition: DpRect

position of the current selected tab

doesTabRowHaveFocus: Boolean

whether any tab in TabRow is focused

modifier: Modifier = Modifier

modifier to be applied to the indicator

activeColor: Color = MaterialTheme.colorScheme.onSurface

color of indicator when TabRow is active

inactiveColor: Color = MaterialTheme.colorScheme.secondaryContainer.copy(alpha = 0.4f)

color of indicator when TabRow is inactive

TabSeparator

Added in 1.0.0
@Composable
fun TabSeparator(): Unit

Space between tabs in the tab row

UnderlinedIndicator

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

Adds an underlined indicator below the tab

Parameters
currentTabPosition: DpRect

position of the current selected tab

doesTabRowHaveFocus: Boolean

whether any tab in TabRow is focused

modifier: Modifier = Modifier

modifier to be applied to the indicator

activeColor: Color = MaterialTheme.colorScheme.primary

color of indicator when TabRow is active

inactiveColor: Color = MaterialTheme.colorScheme.secondary

color of indicator when TabRow is inactive

contentColor

Added in 1.0.0
@Composable
fun contentColor(): Color

Default accent color for the TabRow

Public properties

ContainerColor

Added in 1.0.0
val ContainerColorColor

Color of the background of a tab