---
title: "ButtonGroupScope"
description: ""
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

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



```kotlin
public interface ButtonGroupScope
```

## Functions

```kotlin
public fun Modifier.weight(
        @FloatRange(from = 0.0, fromInclusive = false) weight: Float
    ): Modifier
```


`ButtonGroup` uses a ratio of all sibling item `weight`s to assign a width to each item. The
horizontal space is distributed using `weight` first, and this will only be changed if any
item would be smaller than its `minWidth`. See also `Modifier.minWidth`.

#### Parameters

| | |
| --- | --- |
| weight | The main way of distributing available space. This is a relative measure, and items with no weight specified will have a default of 1f. |



```kotlin
public fun Modifier.minWidth(minWidth: Dp = ButtonGroupDefaults.MinWidth): Modifier
```


Specifies the minimum width this item can be, in Dp. This will only be used if distributing
the available space results in a item falling below its minimum width. Note that this is only
used before animations, pressing a button may result on neighbor button(s) going below their
minWidth. See also `Modifier.weight`

#### Parameters

| | |
| --- | --- |
| minWidth | the minimum width. If none is specified, minimumInteractiveComponentSize is used. |



```kotlin
public fun Modifier.animateWidth(interactionSource: InteractionSource): Modifier
```


Specifies the interaction source to use with this item. This is used to listen to events and
animate growing the pressed button and shrink the neighbor(s).



