Skip to main content

BwRadioGroup | bw-radio-group

Overview

Radio Groups are form controls that allow the user to select a single options from a list of radio buttons. BwRadio's, BwRadioCards, and BwRadioButtons are all valid children of a BwRadioGroup.

Usage

Variants

OneTwoThreeOneTwoThreeOneTwoThreeOneTwoThree
<bw-radio-group label="Basic Example">
<bw-radio value="one">One</bw-radio>
<bw-radio value="two">Two</bw-radio>
<bw-radio value="three">Three</bw-radio>
</bw-radio-group>
<bw-radio-group required="true" label="Required Group">
<bw-radio large value="one">One</bw-radio>
<bw-radio large disabled value="two">Two</bw-radio>
<bw-radio large value="three">Three</bw-radio>
</bw-radio-group>
<bw-radio-group required="true" label="Group With Buttons">
<bw-radio-button value="one">One</bw-radio-button>
<bw-radio-button value="two">Two</bw-radio-button>
<bw-radio-button value="three">Three</bw-radio-button>
</bw-radio-group>
<bw-radio-group required="true" label="Group With Cards">
<bw-radio-card value="one">One</bw-radio-card>
<bw-radio-card value="two">Two</bw-radio-card>
<bw-radio-card value="three">Three</bw-radio-card>
</bw-radio-group>

Properties

PropertyAttributeDescriptionTypeDefault
errorerrorShows an error icon. If a string is passed in, it will render the icon as a tooltip. Has no effect on form validationanyundefined
horizontalhorizontalRadios will be aligned horizontallybooleanfalse
labellabelLabel that shows above the controlsstringundefined
notenoteInformative text that shows below the controlstringundefined
originalValueoriginal-valueThe value the control will reset to. Defaults to the initial value if not set.anyundefined
pendingpendingShows a loading indicatorbooleanfalse
requiredrequiredMakes the element required in forms and will show an error on submissionbooleanfalse
successsuccessShows a success icon. Has no effect on form validationbooleanfalse
valuevalueThe currently selected valueanyundefined

Events

EventDescriptionType
valueChangeEmits the selected value whenever it changesCustomEvent<any>

Methods

checkValidity() => Promise<boolean>

Checks the validity of the radio group

Returns

Type: Promise<boolean>

true if the radio group is valid, false otherwise

getCustomError() => Promise<string>

Gets the custom validity of the radio group

Returns

Type: Promise<string>

The custom validity of the radio group

reportValidity() => Promise<boolean>

Reports the validity of the radio group

Returns

Type: Promise<boolean>

true if the radio group is valid, false otherwise

setCustomValidity(message: string | null) => Promise<void>

Sets the custom validity of the radio group

Parameters

NameTypeDescription
messagestring- The message to set the custom validity to

Returns

Type: Promise<void>

Slots

SlotDescription
"label"The label of the radio group
"note"The note of the radio group

Shadow Parts

PartDescription
"horizontal-container"The container of the radio group when horizontal is true
"status"The container for the status icon and text

CSS Custom Properties

NameDescription
--horizontal-gapThe gap between the radio buttons when horizontal is true

Dependencies

Depends on

Graph


© 2025 United Systems & Software - All Rights Reserved.