<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ToggleStyleConfiguration/label-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24ToggleStyleConfigurationV5labelAC5LabelVvp"
  },
  "title" : "label"
}
-->

# label

A view that describes the effect of switching the toggle between states.

```
let label: ToggleStyleConfiguration.Label
```

## Discussion

Use this value in your implementation of the
[`makeBody(configuration:)`](/documentation/SwiftUI/ToggleStyle/makeBody(configuration:)) method when defining a custom
[`ToggleStyle`](/documentation/SwiftUI/ToggleStyle). Access it through the that method’s `configuration`
parameter.

Because the label is a [`View`](/documentation/SwiftUI/View), you can incorporate it into the
view hierarchy that you return from your style definition. For example,
you can combine the label with a circle image in an [`HStack`](/documentation/SwiftUI/HStack):

```
HStack {
    Image(systemName: configuration.isOn
        ? "checkmark.circle.fill"
        : "circle")
    configuration.label
}
```

---

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)