Radio

Form

One choice of a group; every radio bound to the same state is one group.

Radio(bind: …, value: …, checked: …)

Example

state size = "m" Radio(bind: size, value: "s", label: "Small") Radio(bind: size, value: "m", label: "Medium")

Renders with the class wf-radio, stable across releases, so a stylesheet may target it.

Props of Radio
Prop Type Meaning
bind: State

State variable the control reads and writes (two-way)

value: Any

The value bind takes when this one is chosen

checked: Bool

Whether it is checked, when its state is not bound

label: String

Visible label; also the control's accessible name

disabled: Bool

Whether the control is inert

Attribute families: global, aria, data, input. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.