<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/LabeledContent/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI14LabeledContentVA2A0cD18StyleConfigurationV5LabelVRszAE0D0VRs_rlEyACyAgIGAEcfc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates labeled content based on a labeled content style configuration.

```
init(_ configuration: LabeledContentStyleConfiguration)
```

## Parameters

`configuration`

The properties of the labeled content

## Discussion

You can use this initializer within the
[`makeBody(configuration:)`](/documentation/SwiftUI/LabeledContentStyle/makeBody(configuration:)) method of a
[`LabeledContentStyle`](/documentation/SwiftUI/LabeledContentStyle) to create a labeled content instance.
This is useful for custom styles that only modify the current style,
as opposed to implementing a brand new style.

For example, the following style adds a red border around the labeled
content, but otherwise preserves the current style:

```
struct RedBorderLabeledContentStyle: LabeledContentStyle {
    func makeBody(configuration: Configuration) -> some View {
        LabeledContent(configuration)
            .border(.red)
    }
}
```

---

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)