SwitchToggleStyle

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

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

Platform Compatibility

iOS 13.0+ iPadOS 13.0+ macOS 10.15+ watchOS 6.0+ tvOS 18.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(.switch)
}

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.

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

ButtonToggleStyle

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

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
GroupBox With Label - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

GroupBox With Label

A GroupBox with Label

Compact Photos Picker Style - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

Compact Photos Picker Style

A photos picker style that displays the picker without presenting a sheet.

List Item Tint - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Item Tint

Sets a fixed tint color for content in a list.

Hour Minute Seconds DatePicker - watchOS - Flat Design - Light Mode - Preview
initializer

Hour Minute Seconds DatePicker

A DatePicker for just hour, minute, and second.

UIKit Separator Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Separator Colors

The UIKit separator colors that are also used in other components, such as the TextField

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

Menu

A control for presenting a menu of actions.

Picker Section - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
content

Picker Section

A Section inside a Picker

DatePicker Components  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

DatePicker Components

A date picker with only one displayed component