Object

TabDefaults

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
object TabDefaults

Functions

underlinedIndicatorTabColors

@Composable
    fun underlinedIndicatorTabColors(
        contentColor: Color = LocalContentColor.current,
        inactiveContentColor: Color = contentColor.copy(alpha = 0.4f),
        selectedContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
        focusedContentColor: Color = MaterialTheme.colorScheme.primary,
        focusedSelectedContentColor: Color = focusedContentColor,
        disabledContentColor: Color = contentColor,
        disabledInactiveContentColor: Color = disabledContentColor.copy(alpha = 0.4f),
        disabledSelectedContentColor: Color = selectedContentColor,
    ): TabColors

Tab's content colors to in conjunction with underlined indicator

Parameters

contentColor applied when the any of the other tabs is focused
inactiveContentColor the default color of the tab's content when none of the tabs are focused
selectedContentColor applied when the current tab is selected
focusedContentColor applied when the current tab is focused
focusedSelectedContentColor applied when the current tab is both focused and selected
disabledContentColor applied when any of the other tabs is focused and the current tab is disabled
disabledInactiveContentColor applied when the current tab is disabled and none of the tabs are focused
disabledSelectedContentColor applied when the current tab is disabled and selected

pillIndicatorTabColors

@Composable
    fun pillIndicatorTabColors(
        contentColor: Color = LocalContentColor.current,
        inactiveContentColor: Color = contentColor.copy(alpha = 0.4f),
        selectedContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
        focusedContentColor: Color = MaterialTheme.colorScheme.surfaceVariant,
        focusedSelectedContentColor: Color = focusedContentColor,
        disabledContentColor: Color = contentColor,
        disabledInactiveContentColor: Color = disabledContentColor.copy(alpha = 0.4f),
        disabledSelectedContentColor: Color = selectedContentColor,
    ): TabColors

Tab's content colors to in conjunction with pill indicator

Parameters

contentColor applied when the any of the other tabs is focused
inactiveContentColor the default color of the tab's content when none of the tabs are focused
selectedContentColor applied when the current tab is selected
focusedContentColor applied when the current tab is focused
focusedSelectedContentColor applied when the current tab is both focused and selected
disabledContentColor applied when any of the other tabs is focused and the current tab is disabled
disabledInactiveContentColor applied when the current tab is disabled and none of the tabs are focused
disabledSelectedContentColor applied when the current tab is disabled and selected