<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ButtonToggleStyle/makeBody(configuration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17ButtonToggleStyleV8makeBody13configurationQrAA0dE13ConfigurationV_tF"
  },
  "title" : "makeBody(configuration:)"
}
-->

# makeBody(configuration:)

Creates a view that represents the body of a toggle button.

```
nonisolated func makeBody(configuration: ButtonToggleStyle.Configuration) -> some View
```

## Parameters

`configuration`

The properties of the toggle, including a
label and a binding to the toggle’s state.

## Return Value

A view that acts as a button that controls a Boolean state.

## Discussion

SwiftUI implements this required method of the [`ToggleStyle`](/documentation/SwiftUI/ToggleStyle)
protocol to define the behavior and appearance of the
[`button`](/documentation/SwiftUI/ToggleStyle/button) toggle style. Don’t call this method
directly; the system calls this method for each
[`Toggle`](/documentation/SwiftUI/Toggle) instance in a view hierarchy that’s styled as
a button.

---

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)