# RemoteTextButton

## Functions summary

|---|---|
| `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/remote/creation/compose/layout/RemoteComposable https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButton.composable#RemoteTextButton(androidx.compose.remote.creation.compose.action.RemoteAction,androidx.compose.remote.creation.compose.modifier.RemoteModifier,androidx.compose.remote.creation.compose.state.RemoteBoolean,androidx.compose.remote.creation.compose.shapes.RemoteShape,androidx.wear.compose.remote.material3.RemoteTextButtonColors,androidx.wear.compose.remote.material3.RemoteBorderStroke,kotlin.Function0)( onClick: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/action/RemoteAction, modifier: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/modifier/RemoteModifier, enabled: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/state/RemoteBoolean, shape: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/shapes/RemoteShape, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButtonColors, border: https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteBorderStroke?, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/layout/RemoteComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Wear Material `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButton.composable#RemoteTextButton(androidx.compose.remote.creation.compose.action.RemoteAction,androidx.compose.remote.creation.compose.modifier.RemoteModifier,androidx.compose.remote.creation.compose.state.RemoteBoolean,androidx.compose.remote.creation.compose.shapes.RemoteShape,androidx.wear.compose.remote.material3.RemoteTextButtonColors,androidx.wear.compose.remote.material3.RemoteBorderStroke,kotlin.Function0)` is a circular, text-only button with transparent background and no border. |

## Functions

### RemoteTextButton

Artifact: [androidx.wear.compose.remote:remote-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose-remote) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/remote/material3/RemoteTextButton.kt+function:RemoteTextButton) Added in [1.0.0-alpha15](https://developer.android.com/jetpack/androidx/releases/wear-compose-remote#1.0.0-alpha15)

```
@Composable
@RemoteComposable
fun RemoteTextButton(
    onClick: RemoteAction,
    modifier: RemoteModifier = RemoteModifier,
    enabled: RemoteBoolean = true.rb,
    shape: RemoteShape = RemoteTextButtonDefaults.shape,
    colors: RemoteTextButtonColors = RemoteTextButtonDefaults.textButtonColors(),
    border: RemoteBorderStroke? = null,
    content: @Composable @RemoteComposable () -> Unit
): Unit
```

Wear Material `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButton.composable#RemoteTextButton(androidx.compose.remote.creation.compose.action.RemoteAction,androidx.compose.remote.creation.compose.modifier.RemoteModifier,androidx.compose.remote.creation.compose.state.RemoteBoolean,androidx.compose.remote.creation.compose.shapes.RemoteShape,androidx.wear.compose.remote.material3.RemoteTextButtonColors,androidx.wear.compose.remote.material3.RemoteBorderStroke,kotlin.Function0)` is a circular, text-only button with transparent background and no border. It offers a single slot for text.

The default `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButton.composable#RemoteTextButton(androidx.compose.remote.creation.compose.action.RemoteAction,androidx.compose.remote.creation.compose.modifier.RemoteModifier,androidx.compose.remote.creation.compose.state.RemoteBoolean,androidx.compose.remote.creation.compose.shapes.RemoteShape,androidx.wear.compose.remote.material3.RemoteTextButtonColors,androidx.wear.compose.remote.material3.RemoteBorderStroke,kotlin.Function0)` has no border and a transparent background for low emphasis actions. For actions that require higher emphasis, consider overriding the colors by `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButtonColors#copy(androidx.compose.remote.creation.compose.state.RemoteColor,androidx.compose.remote.creation.compose.state.RemoteColor,androidx.compose.remote.creation.compose.state.RemoteColor,androidx.compose.remote.creation.compose.state.RemoteColor)`

`https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButton.composable#RemoteTextButton(androidx.compose.remote.creation.compose.action.RemoteAction,androidx.compose.remote.creation.compose.modifier.RemoteModifier,androidx.compose.remote.creation.compose.state.RemoteBoolean,androidx.compose.remote.creation.compose.shapes.RemoteShape,androidx.wear.compose.remote.material3.RemoteTextButtonColors,androidx.wear.compose.remote.material3.RemoteBorderStroke,kotlin.Function0)` can be enabled or disabled. A disabled button will not respond to click events.

Example of a `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButton.composable#RemoteTextButton(androidx.compose.remote.creation.compose.action.RemoteAction,androidx.compose.remote.creation.compose.modifier.RemoteModifier,androidx.compose.remote.creation.compose.state.RemoteBoolean,androidx.compose.remote.creation.compose.shapes.RemoteShape,androidx.wear.compose.remote.material3.RemoteTextButtonColors,androidx.wear.compose.remote.material3.RemoteBorderStroke,kotlin.Function0)`:

```kotlin
import androidx.compose.remote.creation.compose.action.valueChange
import androidx.compose.remote.creation.compose.state.MutableRemoteInt
import androidx.compose.remote.creation.compose.state.rs
import androidx.compose.runtime.remember
import androidx.wear.compose.remote.material3.RemoteText
import androidx.wear.compose.remote.material3.RemoteTextButton

val tapCount = remember { MutableRemoteInt(0) }
val text = "+".rs + tapCount.toRemoteString()

RemoteTextButton(
    valueChange(tapCount, tapCount + 1),
    modifier = modifier,
    colors = filledTonalColor(),
) {
    RemoteText(text = text)
}
```

| Parameters |
|---|---|
| `onClick: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/action/RemoteAction` | Will be called when the user clicks the button. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/modifier/RemoteModifier = RemoteModifier` | Modifier to be applied to the button. |
| `enabled: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/state/RemoteBoolean = true.rb` | Controls the enabled state of the button. When `false`, this button will not be clickable. It must be a constant value. |
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/shapes/RemoteShape = RemoteTextButtonDefaults.shape` | Defines the shape for this button. Defaults to a static shape based on `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButtonDefaults#shape()` |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButtonColors = RemoteTextButtonDefaults.textButtonColors()` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteTextButtonColors` that will be used to resolve the background and content color for this button in different states. |
| `border: https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteBorderStroke? = null` | Optional `https://developer.android.com/reference/kotlin/androidx/wear/compose/remote/material3/RemoteBorderStroke` that will be used to resolve the border for this button in different states. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable @https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/layout/RemoteComposable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The content displayed on the text button, expected to be text or image. |