name thatuiuser interface

One connected control, one selected segment — a segmented control

Segmented Control

/ NSSegmentedControl · PickerStyle.segmented /

also called segment control, segmented picker, button group

A segmented control groups a small set of related choices into one horizontal row of connected buttons. The selected segment receives a pressed or filled appearance, making the current mode immediately visible. NSSegmentedControl can also be configured for multiple or momentary tracking, but a segmented Picker normally represents one persistent selection.

Anatomy — every part, named

  1. 1
    Selected segmentNSSegmentedControl.selectedSegment

    “The section that stays pressed” is the selected segment.

  2. 2
    Segment dividerNSSegmentedControl

    “The little line separating two choices in the pill” is a segment divider.

Prompt — paste into your agent

Use a Segmented Control with NSSegmentedControl (SwiftUI: a Picker with PickerStyle.segmented), showing the active segment with the native selected treatment. Keep the buttons connected as one control and bind selection so exactly one segment remains selected for this view switcher.

In code

The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).

AppKitNSSegmentedControl
SwiftUIPickerStyle.segmented
AppKitNSSegmentedControl.trackingModesingle, multiple, or momentary selection behavior
SwiftUIView.pickerStyle(_:)

See also

Search

Describe the UI element you're thinking of