<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ControlGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12ControlGroupV"
  },
  "title" : "ControlGroup"
}
-->

# ControlGroup

A container view that displays semantically-related controls
in a visually-appropriate manner for the context

```
nonisolated struct ControlGroup<Content> where Content : View
```

## Overview

You can provide an optional label to this view that describes its children.
This view may be used in different ways depending on the surrounding
context. For example, when you place the control group in a
toolbar item, SwiftUI uses the label when the group is moved to the
toolbar’s overflow menu.

```
ContentView()
    .toolbar(id: "items") {
        ToolbarItem(id: "media") {
            ControlGroup {
                MediaButton()
                ChartButton()
                GraphButton()
            } label: {
                Label("Plus", systemImage: "plus")
            }
        }
    }
```

## Topics

### Creating a control group

[`init(content:)`](/documentation/SwiftUI/ControlGroup/init(content:))

Creates a new ControlGroup with the specified children

[`init(content:label:)`](/documentation/SwiftUI/ControlGroup/init(content:label:))

Creates a new control group with the specified content and a label.

[`init ( _ : content :)`](/documentation/SwiftUI/ControlGroup/init(_:content:))

Creates a new control group with the specified content that generates
its label from a string.

### Creating a control group with an image

[`init ( _ : image : content :)`](/documentation/SwiftUI/ControlGroup/init(_:image:content:))

Creates a new control group with the specified content that generates
its label from a localized string resource and image resource.

[`init ( _ : systemImage : content :)`](/documentation/SwiftUI/ControlGroup/init(_:systemImage:content:))

Creates a new control group with the specified content that generates
its label from a string and image name.

### Creating a configured control group

[`init(_:)`](/documentation/SwiftUI/ControlGroup/init(_:))

Creates a control group based on a style configuration.

### Supporting types

[`LabeledControlGroupContent`](/documentation/SwiftUI/LabeledControlGroupContent)

A view that represents the body of a control group with a specified
label.

## Relationships

### Conforms To

[`View`](/documentation/SwiftUI/View)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)