SegmentedControl
A native segmented picker with value-selection and neutral Xcode-style tab roles.
#Import
Import SegmentedControl from @quickgui/solid/swift-ui.
import { Host, SegmentedControl } from "@quickgui/solid/swift-ui";#Usage
<Host matchContents>
<SegmentedControl
role="tabs"
selection={layout()}
options={[
{ value: "list", label: "List" },
{ value: "grid", label: "Grid" },
]}
onSelectionChange={setLayout}
/>
</Host>#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
SegmentedControl
View sourceSegmentedControl(props: SegmentedControlProps): NativeNodetestIDstring—
modifiersViewModifier[]—
selectionstring—
optionsreadonly PickerOption[]—
Declares options. Reactive JSX expressions update this property in place.
readonly PickerOption[]View sourcelabelstring—
onSelectionChange(selection: string, event: QuickGuiEvent) => void—
Declares onSelectionChange (optional). Reactive JSX expressions update this property in place.
(selection: string, event: QuickGuiEvent) => voidView sourceref((node: NativeNode) => void) | NativeNode—
Declares ref (optional). Reactive JSX expressions update this property in place.
((node: NativeNode) => void) | NativeNodeView sourceroleSegmentedControlRole—
Use `tabs` for Xcode-style neutral segmented tab navigation on macOS 27.
SegmentedControlRoleView source