ButtonToggleStyle

A toggle style that displays as a button with its label as the title.

ButtonToggleStyle - iOS Liquid Glass Light Mode Preview

Platform Compatibility

iOS 15.0+ iPadOS 15.0+ macOS 12.0+ watchOS 9.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
@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(.button)
}

Found an issue or have a suggestion?

Created: July 5, 2026Updated: July 5, 2026
Connect Wizard

Connect Wizard

Unlock hidden App Store Connect analytics

Download