Reference machines
radioGroup
interface 3 type 3 function 1
# CreateRadioGroupInput
Type Parameters
V
Members
defaultValue?optional defaultValue?: V | nulldisabled?optional disabled?: booleanitemsitems: readonly RadioItem<V>[]
# RadioGroupContext
Type Parameters
V
Members
focusedIdfocusedId: string | nullitemsitems: readonly RadioItem<V>[]valuevalue: V | null
# RadioItem
Type Parameters
V
Members
disabled?readonly optional disabled?: boolean###### Overrides
CollectionItem.disabledidreadonly id: string###### Overrides
CollectionItem.idlabel?readonly optional label?: string###### Overrides
CollectionItem.labelvaluereadonly value: V
# RadioGroupEvent
RadioGroupEvent<V> = { id: string; type: "SELECT"; } | { id: string; type: "FOCUS"; } | { type: "BLUR"; } | { direction: NavigateDirection; type: "NAVIGATE"; } | { type: "SET.VALUE"; value: V | null; } | { items: ReadonlyArray<RadioItem<V>>; type: "SET.ITEMS"; } | { type: "DISABLE"; } | { type: "ENABLE"; }Type Parameters
V
# RadioGroupMachine
RadioGroupMachine<V> = Machine<RadioGroupContext<V>, RadioGroupEvent<V>, RadioGroupState>Type Parameters
V
# RadioGroupState
RadioGroupState = "idle" | "disabled"# createRadioGroupMachine ( )
createRadioGroupMachine<V>(input): RadioGroupMachine<V>Construct a fresh RadioGroup machine.
Type Parameters
V
Parameters
inputCreateRadioGroupInput<V>
Returns
RadioGroupMachine<V>