<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/GroupBox/init(content:label:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI8GroupBoxV7content5labelACyxq_Gq_yXE_xyXEtcfc"
  },
  "title" : "init(content:label:)"
}
-->

# init(content:label:)

Creates a group box with the provided label and view content.

```
@export(implementation) nonisolated init(@ContentBuilder content: () -> Content, @ContentBuilder label: () -> Label)
```

## Parameters

`content`

A [`ContentBuilder`](/documentation/SwiftUI/ContentBuilder) that produces the content for the
group box.

`label`

A [`ContentBuilder`](/documentation/SwiftUI/ContentBuilder) that produces a label for the group
box.

---

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)