<!--
{
  "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/ToggleStyleConfiguration/isMixed",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24ToggleStyleConfigurationV7isMixedSbvp"
  },
  "title" : "isMixed"
}
-->

# isMixed

Whether the [`Toggle`](/documentation/SwiftUI/Toggle) is currently in a mixed state.

```
var isMixed: Bool
```

## Discussion

Use this property to determine whether the toggle style should render
a mixed state presentation. A mixed state corresponds to an underlying
collection with a mix of true and false Bindings.
To toggle the state, use the `Bool.toggle()` method on the [`isOn`](/documentation/SwiftUI/ToggleStyleConfiguration/isOn)
binding.

In the following example, a custom style uses the `isMixed` property
to render the correct toggle state using symbols:

```
struct SymbolToggleStyle: ToggleStyle {
    func makeBody(configuration: Configuration) -> some View {
        Button {
            configuration.isOn.toggle()
        } label: {
            Image(
                systemName: configuration.isMixed
                ? "minus.circle.fill" : configuration.isOn
                ? "checkmark.circle.fill" : "circle.fill")
            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)