I can't get Material 3 ButtonGroup


I want to create a group of action buttons, but I am having trouble using ButtonGroup.

Android Studio does not provide any hints or autocomplete suggestions because it cannot find this component.

My libraries:

composeBom = "2026.05.01" androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } androidx-ui = { group = "androidx.compose.ui", name = "ui" } androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } androidx-material3 = { group = "androidx.compose.material3", name = "material3" }

I tried upgrading composeBom to 2026.06.00, but unfortunately that did not change anything.

Could someone please suggest what else I should do?

1
Jun 18 at 8:27 AM
User AvatarStanisław Olszak
#android#android-jetpack-compose

Accepted Answer

This is because the ButtonGroup composable is a Material3 expressive component that was removed in Material3 1.4.x, with release notes indicating that they will only be available from the 1.5.x alphas:

> Breaking changes > > All public APIs tagged with ExperimentalMaterial3ExpressiveApi or ExperimentalMaterial3ComponentOverrideApi have been removed, please switch to 1.5.0-alpha to continue enjoying these features. (Ie4ae0) > > <sup>~from 1.4.0-beta01 release notes</sup>

The Compose Bill of Materials (BoM) will only specify stable releases by default so you'll have to either:

  • explicitly use the alpha release (1.5.0-alpha22 as of the time of writing):

    androidx-material3 = { group = &quot;androidx.compose.material3&quot;, name = &quot;material3&quot;, version = &quot;1.5.0-alpha22&quot; }
  • or opt to use the alpha release of the BoM artifact (androidx.compose:compose-bom-alpha):

    composeBom = &quot;2026.06.00&quot; androidx-compose-bom = { group = &quot;androidx.compose&quot;, name = &quot;compose-bom-alpha&quot;, version.ref = &quot;composeBom&quot; }

Note that the ButtonGroup API, although an expressive component, was just recently made non-experimental in the latest 1.5.0-alpha22 release:

> Promote ButtonGroup APIs to stable. Remove deprecated experimental APIs that were introduced in a 1.5.0-alpha. (Idaf96, b/497876828)

User AvatarEdric
Jun 18 at 8:37 AM
4