Picker
A controlled SwiftUI picker with menu, segmented, radio-group, and inline styles.
#Import
Import Picker from @quickgui/solid/swift-ui.
import { Host, Picker } from "@quickgui/solid/swift-ui";#Usage
<Host matchContents>
<Picker
label="Theme"
selection={theme()}
options={[
{ value: "system", label: "System" },
{ value: "light", label: "Light" },
{ value: "dark", label: "Dark" },
]}
style="menu"
onSelectionChange={setTheme}
/>
</Host>#API reference
Expand an entry for its description and complete signature. A dash means no declaration default is documented.
Picker
View sourcePicker(props: PickerProps): NativeNodetestIDstring—
modifiersViewModifier[]—
selectionstring—
optionsreadonly PickerOption[]—
Declares options. Reactive JSX expressions update this property in place.
readonly PickerOption[]View sourcelabelstring—
stylePickerStyle—
Layout, typography, paint, and interaction-state styles. Arrays merge left to right.
PickerStyleView sourceonSelectionChange(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 source