# TabRowScope

Artifact: [androidx.tv:tv-material](https://developer.android.com/jetpack/androidx/releases/tv) [View Source](https://cs.android.com/search?q=file:androidx/tv/material3/TabRowScope.kt+class:androidx.tv.material3.TabRowScope) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/tv#1.0.0)


```
interface TabRowScope
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/tv/material3/TabRowScope` is used to provide the doesTabRowHaveFocus state to the `https://developer.android.com/reference/kotlin/androidx/tv/material3/Tab.composable#(androidx.tv.material3.TabRowScope).Tab(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,androidx.tv.material3.TabColors,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)` composable

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/tv/material3/TabRowScope#hasFocus()` Whether any `https://developer.android.com/reference/kotlin/androidx/tv/material3/Tab.composable#(androidx.tv.material3.TabRowScope).Tab(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,androidx.tv.material3.TabColors,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)` within the `https://developer.android.com/reference/kotlin/androidx/tv/material3/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function2,kotlin.Function1)` is focused |

| ### Extension 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/tv/material3/TabRowScope.https://developer.android.com/reference/kotlin/androidx/tv/material3/TabRowScope#(androidx.tv.material3.TabRowScope).Tab(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,androidx.tv.material3.TabColors,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)( selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, onFocus: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, onClick: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, colors: https://developer.android.com/reference/kotlin/androidx/tv/material3/TabColors, interactionSource: https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource?, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/RowScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Material Design tab. |

## Public properties

### hasFocus

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/tv#1.0.0)

```
val hasFocus: Boolean
```

Whether any `https://developer.android.com/reference/kotlin/androidx/tv/material3/Tab.composable#(androidx.tv.material3.TabRowScope).Tab(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,androidx.tv.material3.TabColors,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)` within the `https://developer.android.com/reference/kotlin/androidx/tv/material3/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function2,kotlin.Function1)` is focused

## Extension functions

### TabRowScope.Tab

Artifact: [androidx.tv:tv-material](https://developer.android.com/jetpack/androidx/releases/tv) [View Source](https://cs.android.com/search?q=file:androidx/tv/material3/Tab.kt+function:Tab)

```
@Composable
fun TabRowScope.Tab(
    selected: Boolean,
    onFocus: () -> Unit,
    modifier: Modifier = Modifier,
    onClick: () -> Unit = {},
    enabled: Boolean = true,
    colors: TabColors = TabDefaults.pillIndicatorTabColors(),
    interactionSource: MutableInteractionSource? = null,
    content: @Composable RowScope.() -> Unit
): Unit
```

Material Design tab.

A default Tab, also known as a Primary Navigation Tab. Tabs organize content across different screens, data sets, and other interactions.

This should typically be used inside of a `https://developer.android.com/reference/kotlin/androidx/tv/material3/TabRow.composable#TabRow(kotlin.Int,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,kotlin.Function0,kotlin.Function2,kotlin.Function1)`, see the corresponding documentation for example usage.

| Parameters |
|---|---|
| `selected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | whether this tab is selected or not |
| `onFocus: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | called when this tab is focused |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to this tab |
| `onClick: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html = {}` | called when this tab is clicked (with D-Pad Center) |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | controls the enabled state of this tab. When `false`, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services. |
| `colors: https://developer.android.com/reference/kotlin/androidx/tv/material3/TabColors = TabDefaults.pillIndicatorTabColors()` | these will be used by the tab when in different states (focused, selected, etc.) |
| `interactionSource: https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource? = null` | an optional hoisted `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/MutableInteractionSource` for observing and emitting `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction`s for this tab. You can use this to change the tab's appearance or preview the tab in different states. Note that if `null` is provided, interactions will still happen internally. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/RowScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | content of the `https://developer.android.com/reference/kotlin/androidx/tv/material3/Tab.composable#(androidx.tv.material3.TabRowScope).Tab(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Boolean,androidx.tv.material3.TabColors,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)` |