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

# init(_:value:format:)

Creates a labeled informational view from a formatted value.

```
init<F>(_ titleKey: LocalizedStringKey, value: F.FormatInput, format: F) where F : FormatStyle, F.FormatInput : Equatable, F.FormatOutput == String
```

## Parameters

`titleKey`

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

`value`

The value being labeled.

`format`

A format style of type `F` to convert the underlying value
of type `F.FormatInput` to a string representation.

## 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.

```
Form {
    LabeledContent("Age", value: person.age, format: .number)
    LabeledContent("Height", value: person.height,
        format: .measurement(width: .abbreviated))
}
```

---

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)