---
title: "FilledTonalToggleButton"
description: "Toggle button is a toggleable button that switches between primary and tonal colors depending on checked's value."
type: "component"
social_image: "/static/images/material3/tonal-toggle-buttons.png"
lastmod: "2026-07-30T07:35:59.048760Z"
---
## API Reference

### FilledTonalToggleButton

> Source set: Common

```kotlin
@Composable
fun FilledTonalToggleButton(
    checked: Boolean,
    onCheckedChange: (Boolean) -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    shapes: ToggleButtonShapes = ToggleButtonDefaults.shapesFor(ButtonDefaults.MinHeight),
    colors: ToggleButtonColors = ToggleButtonDefaults.filledTonalToggleButtonColors(),
    elevation: ButtonElevation? = ButtonDefaults.filledTonalButtonElevation(),
    border: BorderStroke? = null,
    contentPadding: PaddingValues = ButtonDefaults.contentPaddingFor(ButtonDefaults.MinHeight),
    interactionSource: MutableInteractionSource? = null,
    content: @Composable RowScope.() -> Unit,
) =
    ToggleButton(
        checked = checked,
        onCheckedChange = onCheckedChange,
        modifier = modifier,
        enabled = enabled,
        shapes = shapes,
        colors = colors,
        elevation = elevation,
        border = border,
        contentPadding = contentPadding,
        interactionSource = interactionSource,
        content = content,
    )
```

#### Parameters

| | |
| --- | --- |
| checked | whether the toggle button is toggled on or off. |
| onCheckedChange | called when the toggle button is clicked. |
| modifier | the [Modifier](/jetpack-compose/androidx.compose.ui/ui/interfaces/Modifier) to be applied to the toggle button. |
| enabled | controls the enabled state of this toggle button. When `false`, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services. |
| shapes | the [ToggleButtonShapes](/jetpack-compose/androidx.compose.material3/material3/classes/ToggleButtonShapes) that the toggle button will morph between depending on the user's interaction with the toggle button. |
| colors | [ToggleButtonColors](/jetpack-compose/androidx.compose.material3/material3/classes/ToggleButtonColors) that will be used to resolve the colors used for this toggle button in different states. See [ToggleButtonDefaults.filledTonalToggleButtonColors](/jetpack-compose/androidx.compose.material3/material3/objects/ToggleButtonDefaults). |
| elevation | [ButtonElevation](/jetpack-compose/androidx.compose.material3/material3/classes/ButtonElevation) used to resolve the elevation for this button in different states. This controls the size of the shadow below the button. Additionally, when the container color is [ColorScheme.surface](/jetpack-compose/androidx.compose.material3/material3/classes/ColorScheme), this controls the amount of primary color applied as an overlay. |
| border | the border to draw around the container of this toggle button. |
| contentPadding | the spacing values to apply internally between the container and the content |
| interactionSource | an optional hoisted [MutableInteractionSource](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/MutableInteractionSource) for observing and emitting [Interaction](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/Interaction)s for this toggle button. You can use this to change the toggle button's appearance or preview the toggle button in different states. Note that if `null` is provided, interactions will still happen internally. |
| content | The content displayed on the toggle button, expected to be text, icon or image. |

## Code Examples
### FilledTonalToggleButtonSample
```kotlin
@Preview
@Composable
fun FilledTonalToggleButtonSample() {
    var checked by remember { mutableStateOf(false) }
    FilledTonalToggleButton(checked = checked, onCheckedChange = { checked = it }) {
        Text("Tonal Button")
    }
}
```
