SweetUI

Search items

Jump to an item

component

toggle-group

Toggle treatment, ControlGroup.

toggle-grouptogglecontrol-groupmulti-selectionmodifier
toggle-group, light

On iPad

The same installed source at a regular width. It adapts its layout without a separate design.

toggle-group on iPad, light

Install

With the sweetui tool (brew install mangobyte-dev/tap/sweetui):

sweetui install toggle-group --destination Sources/YourFeature/Components

Installs in order: button 0.5.2, toggle 0.2.1, toggle-group 0.2.1. Point --destination at a folder inside the consuming target's sources.

Usage

// Content layer only. In toolbars, tab bars, or floating chrome the system supplies Liquid Glass; use .buttonStyle(.glass) or .buttonStyle(.glassProminent) there instead of .registry styles.

@State private var bold = false
@State private var italic = false

ControlGroup {
    Toggle("Bold", systemImage: "bold", isOn: $bold)
    Toggle("Italic", systemImage: "italic", isOn: $italic)
}
.registryToggleGroup()

Accessibility contract

  • Toggle state, activation, bindings caller-owned.
  • Icon-only labels needed.
  • Dynamic Type, enabled, size, layout direction.

Details

Kindcomponent
Version0.2.1
PlatformsiOS 26.0+
Dependenciestoggle, button
SourceRegistry/sources/components/RegistryToggleGroupModifier.swift
Xcode previewToggle Group