Source set: Common
public object TabRowDefaults
Contains default implementations and values used for TabRow.
Properties
DividerOpacity
Source set: Common
public const val DividerOpacity: Float = 0.12f
Default opacity for the color of Divider
DividerThickness
Source set: Common
public val DividerThickness: Dp = 1.dp
Default thickness for Divider
IndicatorHeight
Source set: Common
public val IndicatorHeight: Dp = 2.dp
Default height for Indicator
ScrollableTabRowPadding
Source set: Common
public val ScrollableTabRowPadding: Dp = 52.dp
The default padding from the starting edge before a tab in a ScrollableTabRow.
Functions
Divider
Source set: Common
@Composable
public fun Divider(
modifier: Modifier = Modifier,
thickness: Dp = DividerThickness,
color: Color = LocalContentColor.current.copy(alpha = DividerOpacity),
)
Default Divider, which will be positioned at the bottom of the TabRow, underneath the indicator.
Parameters
| modifier | modifier for the divider's layout |
| thickness | thickness of the divider |
| color | color of the divider |
Indicator
Source set: Common
@Composable
public fun Indicator(
modifier: Modifier = Modifier,
height: Dp = IndicatorHeight,
color: Color = LocalContentColor.current,
)
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 |
tabIndicatorOffset
Source set: Common
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. |