<!--
{
  "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(_:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI14LabeledContentVA2A4TextVRszAA4ViewR_rlE_7contentACyAEq_GAA18LocalizedStringKeyV_q_yXEtcfc::OverloadGroup"
  },
  "title" : "init(_:content:)"
}
-->

# init(_:content:)

Creates a labeled view that generates its label from a localized string
key.

```
init(_ titleKey: LocalizedStringKey, @ContentBuilder content: () -> Content)
```

## Parameters

`titleKey`

The key for the view’s localized title, that describes
the purpose of the view.

`content`

The value content being labeled.

## Discussion

This initializer creates a [`Text`](/documentation/SwiftUI/Text) label on your behalf, and treats the
localized key similar to [`init(_:tableName:bundle:comment:)`](/documentation/SwiftUI/Text/init(_:tableName:bundle:comment:)). See
`Text` for more information about localizing strings.

---

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)