Skip to main content

RadioGroup

shadow

RadioGroup serves as a container for a group of radio buttons. Allows users to select one option from a set of options, ensuring that only one radio button within a group is selected at any given time. The component supports the inline attribute, which, when set, arranges the radio buttons in a horizontal layout. In addition, it programmatically manages the value attribute, which reflects the value of the currently selected radio button.

Attributes and Properties

value

DescriptionThe value of the currently selected radio button in the group.
Attributevalue
Typestring
Defaultundefined

inline

DescriptionIf set, the radio buttons will appear in a row instead of a column.
Attributeinline
Typeboolean
Defaultfalse

name

DescriptionThe name of the radio button group used when submitting the form.
Attributename
Typestring
Defaultundefined

Events

NameDescription
wje-radio:changeIssued when the selected radio button in the group is changed.

Methods

getAllElements

DescriptionReturns all direct child elements of the current element.
SignaturegetAllElements() => HTMLElement[]

CheckRadio

DescriptionMarks the radio button with the given value.
SignaturecheckRadio(value: string) => boolean

removeCheck

DescriptionRemoves the marking from all radio buttons.
SignatureremoveCheck() => void

getRadioByValue

DescriptionReturns the radio button with the given value.
SignaturegetRadioByValue(value: string) => Radio

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

No CSS custom properties available for this component.

Slots

NameDescription
``Default location for radio buttons.