SweetUI

Search items

Jump to an item

recipe

tabs

Picker segmented; local selection, TabView nav.

tabspickersegmentedselectionguidance
tabs, light

On iPad

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

tabs on iPad, light

Install

Usage

@State private var selection = "overview"

Picker("Section", selection: $selection) {
    Text("Overview").tag("overview")
    Text("Activity").tag("activity")
    Text("Settings").tag("settings")
}
.pickerStyle(.segmented)
.registryItem("tabs")

Why native is enough

.pickerStyle(.segmented): local selection; TabView: app nav. No wrapper.

Accessibility contract

  • Retains Picker segmented semantics; selection caller-owned, not TabView nav.
  • Needs concise, large-text-legible segment labels; inherits enabled, tint, direction.

Details

Kindrecipe
Version0.3.1
PlatformsiOS 26.0+
Dependenciesnone
Sourcenone (native guidance)