CheckboxToggleStyle
A toggle style that displays a checkbox followed by its label.
Platform Compatibility
macOS 10.15+
Tags
SwiftUI Code
@State var isOn = false
var body: some View {
List {
Toggle("Foo1", isOn: $isOn)
Toggle("Foo2", image: .cats24X24, isOn: $isOn)
Toggle("Foo3", systemImage: "star", isOn: $isOn)
Toggle(isOn: $isOn) {
Label("Foo4", systemImage: "star")
Text("Bar")
}
Toggle("Foo5", isOn: .constant(true))
}
.toggleStyle(.checkbox)
}Found an issue or have a suggestion?
Created: July 5, 2026Updated: July 5, 2026
More Toggle Components
View allMultiple Sources Toggle
Creates a toggle that updates the selected property for all sources. Once toggled, all sources will have the same value.
Explore Other Components
Browse allLinearCapacityGaugeStyle
A gauge style that displays a bar that fills from leading to trailing edges as the gauge’s current value increases
Min Max Current Value Gauge
Creates a gauge showing a value within a range and describes the gauge’s current, minimum, and maximum values
Outline Group
A structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.