Interactive previews iPhone Apple Watch

ButtonToggleStyle

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

ButtonToggleStyle - iOS on iPhone - Portrait - 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

More Toggle Components

View all
CheckboxToggleStyle - macOS - Liquid Glass - Light Mode - Preview
style

CheckboxToggleStyle

A toggle style that displays a checkbox followed by its label.

SwitchToggleStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

SwitchToggleStyle

A toggle style that displays a leading label and a trailing switch.

Multiple Sources Toggle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Multiple Sources Toggle

Creates a toggle that updates the selected property for all sources. Once toggled, all sources will have the same value.

Toggle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Toggle

Creates a toggle with title, image, systemImage, and custom label.

Explore Other Components

Browse all
Sheet Corner Radius - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Sheet Corner Radius

Requests that the presentation have a specific corner radius.

CircularGaugeStyle - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
style

CircularGaugeStyle

A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value

Current Value Gauge  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Current Value Gauge

Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value

GraphicalDatePickerStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

GraphicalDatePickerStyle

A date picker style that displays an interactive calendar or clock

Button Styles - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Button Styles

A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy

Menu Divider - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Menu Divider

A Menu with a Divider

Menu Fixed Order - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Menu Fixed Order

Order items from top to bottom

Custom Icon Store View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Icon Store View

Creates a view to load a collection of products from the App Store using product identifiers, and merchandise them using a custom image.