Select
A dropdown picker with optional label.
s0 add select
Usage
@State private var fruit = "apple"
S0.Select("Fruit", selection: $fruit, options: [
(value: "apple", label: "Apple"),
(value: "banana", label: "Banana"),
(value: "cherry", label: "Cherry"),
])Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| label | String? | nil | Optional label above the picker. |
| selection | Binding<Value> | — | Binding to the selected value. |
| options | [(value: Value, label: String)] | — | Array of value-label pairs. |