Segmented Buttons

var selectedItem by remember { mutableStateOf(0) }var items = listOf("Kitty", "Squirrel", "Dog")
SingleChoiceSegmentedButtonRow { items.forEachIndexed { index, item -> SegmentedButton( selected = index == selectedItem, onClick = { selectedItem = index }, shape = SegmentedButtonDefaults.itemShape(index = index, count = items.size) ) { Text(item) } }}The segmented buttons only have rounded borders on the left for the first button and on the right for the last button. This requires you to provide the index and count so it knows which shape to render.