<h2 id="spacetogglebutton-modifier-colors-content">SpaceToggleButton</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@Composable
public fun SpaceToggleButton(
    modifier: Modifier = Modifier,
    colors: IconToggleButtonColors = IconButtonDefaults.iconToggleButtonColors(),
    content: @Composable (isFullSpace: Boolean) -> Unit = { isFullSpace ->
        if (isFullSpace) {
            SpaceToggleButtonDefaults.CollapseIcon()
        } else {
            SpaceToggleButtonDefaults.ExpandIcon()
        }
    },
)
```

#### Parameters

| | |
| --- | --- |
| modifier | The modifier to be applied to the button layout. |
| colors | [IconToggleButtonColors](/jetpack-compose/androidx.compose.material3/material3/classes/IconToggleButtonColors) that will be used to resolve the colors for this button. |
| content | The content to be displayed inside the button. |