# TabRowDefaults

Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/TabRow.kt+class:androidx.compose.material.TabRowDefaults) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  object TabRowDefaults
  ```

*** ** * ** ***

Contains default implementations and values used for TabRow.

## Summary

| ### Constants |
|---|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#DividerOpacity() = 0.12f` Default opacity for the color of `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)` | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)(modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, thickness: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Default `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)`, which will be positioned at the bottom of the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,kotlin.Function0,kotlin.Function0)`, underneath the indicator. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Indicator(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)(modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, height: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Default indicator, which will be positioned at the bottom of the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,kotlin.Function0,kotlin.Function0)`, on top of the divider. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#(androidx.compose.ui.Modifier).tabIndicatorOffset(androidx.compose.material.TabPosition)(currentTabPosition: https://developer.android.com/reference/kotlin/androidx/compose/material/TabPosition)` `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` that takes up all the available width inside the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,kotlin.Function0,kotlin.Function0)`, and then animates the offset of the indicator it is applied to, depending on the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#(androidx.compose.ui.Modifier).tabIndicatorOffset(androidx.compose.material.TabPosition)`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#DividerThickness()` Default thickness for `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#IndicatorHeight()` Default height for `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Indicator(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#ScrollableTabRowPadding()` The default padding from the starting edge before a tab in a `https://developer.android.com/reference/kotlin/androidx/compose/material/ScrollableTabRow.composable#ScrollableTabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,kotlin.Function1,kotlin.Function0,kotlin.Function0)`. | Cmn |

## Constants

### DividerOpacity

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

```
const val DividerOpacity = 0.12f: Float
```

Default opacity for the color of `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)`

## Public functions

### Divider

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0)

```
@Composable
fun Divider(
    modifier: Modifier = Modifier,
    thickness: Dp = DividerThickness,
    color: Color = LocalContentColor.current.copy(alpha = DividerOpacity)
): Unit
```

Default `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)`, which will be positioned at the bottom of the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,kotlin.Function0,kotlin.Function0)`, underneath the indicator.

| Parameters |
|---|---|
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | modifier for the divider's layout |
| `thickness: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = DividerThickness` | thickness of the divider |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = LocalContentColor.current.copy(alpha = DividerOpacity)` | color of the divider |

### Indicator

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0)

```
@Composable
fun Indicator(
    modifier: Modifier = Modifier,
    height: Dp = IndicatorHeight,
    color: Color = LocalContentColor.current
): Unit
```

Default indicator, which will be positioned at the bottom of the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,kotlin.Function0,kotlin.Function0)`, on top of the divider.

| Parameters |
|---|---|
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | modifier for the indicator's layout |
| `height: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = IndicatorHeight` | height of the indicator |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = LocalContentColor.current` | color of the indicator |

### Modifier.tabIndicatorOffset

Cmn Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/TabRow.kt+function:tabIndicatorOffset) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

```
fun Modifier.tabIndicatorOffset(currentTabPosition: TabPosition): Modifier
```

`https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` that takes up all the available width inside the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function1,kotlin.Function0,kotlin.Function0)`, and then animates the offset of the indicator it is applied to, depending on the `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#(androidx.compose.ui.Modifier).tabIndicatorOffset(androidx.compose.material.TabPosition)`.

| Parameters |
|---|---|
| `currentTabPosition: https://developer.android.com/reference/kotlin/androidx/compose/material/TabPosition` | `https://developer.android.com/reference/kotlin/androidx/compose/material/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. |

## Public properties

### DividerThickness

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

```
val DividerThickness: Dp
```

Default thickness for `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Divider(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)`

### IndicatorHeight

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

```
val IndicatorHeight: Dp
```

Default height for `https://developer.android.com/reference/kotlin/androidx/compose/material/TabRowDefaults#Indicator(androidx.compose.ui.Modifier,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)`

### ScrollableTabRowPadding

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)

```
val ScrollableTabRowPadding: Dp
```

The default padding from the starting edge before a tab in a `https://developer.android.com/reference/kotlin/androidx/compose/material/ScrollableTabRow.composable#ScrollableTabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.unit.Dp,kotlin.Function1,kotlin.Function0,kotlin.Function0)`.