single-choice-radio
Overview
The single-choice-radio
component allows users to make a single selection from a pre-defined set of options.
Version compatibility
single-choice-radio
was introduced in version 4.36.1 of the JourneyApps Container.It was updated visually and the
disabled
attribute was introduced in version 4.75.0 of the JourneyApps Runtime.
Basic Example
Standard Attributes
bind
bind
label
label
required
required
Advanced Attributes
align-content
align-content
align-label
align-label
disabled
disabled
Version compatibility
disabled
was introduced in version 4.75.0 of the JourneyApps Runtime.
id
id
label-case
label-case
Version compatibility
label-case
was introduced in version 4.80.0 of the JourneyApps Runtime.
label-color
label-color
mode
mode
Version compatibility
mode
was introduced in version 4.83.0 of the JourneyApps Runtime.
Optional
Type: row
| column
Default: column
Configure the layout of the list of options. row
lists options horizontally; column
lists options vertically.
on-change
on-change
When using single-choice-integer
you can omit the key attribute on options. The value passed to the function assigned to on-change
will correspond to the key starting from 0
.
radio-position
radio-position
Version compatibility
radio-position
was introduced in version 4.86.1 of the JourneyApps Runtime.
Optional
Type: left
| right
Default: left
Specify where the radio button is positioned in the component (relative to the option label).
show-if
and hide-if
show-if
and hide-if
Component Methods
The following component methods are available when an id
is assigned to the component and component.singleChoiceRadio({id:'my-id'})
is called from JS/TS:
scrollIntoView
scrollIntoView
Programmatically scroll until the single-choice-radio
component is visible in the view.
selectItem
selectItem
Programmatically select an item by its label.
selectItemByIndex
selectItemByIndex
Programmatically select an item by its index. Note: Indexes begin at 1.
Last updated