Docs
Components/Forms/RadioGroup

RadioGroup

A single-select group of radio buttons.

s0 add radio-group

Usage

@State private var plan = "free"

S0.RadioGroup(selection: $plan, options: [
    (value: "free", label: "Free"),
    (value: "pro", label: "Pro"),
    (value: "enterprise", label: "Enterprise"),
])

Parameters

NameTypeDefaultDescription
selectionBinding<Value>Binding to the selected value.
options[(value: Value, label: String)]Array of value-label pairs.