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?
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 = "androidx.compose.material3", name = "material3", version = "1.5.0-alpha22" }
or opt to use the alpha release of the BoM artifact (androidx.compose:compose-bom-alpha):
composeBom = "2026.06.00" androidx-compose-bom = { group = "androidx.compose", name = "compose-bom-alpha", version.ref = "composeBom" }
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)