Skip to content

Radio Button Group

Radio Button Groups are used to interact with a row of related options.

They are made of equally wide Radio Button Items and, allow to select and activate only one option at a time. A group can only have one row.

Examples

The radio button group takes the form of a horizontal bar of buttons, of which only a single one can be toggled at any one time:

The buttons can have icons and badges as additional elements, and can also be icon-only without a label at all. See Radio Button Item for all available attributes.

Note that when slottet into a group, the position attribute of the item is unnecessary, as the group controls this.

Tables

Properties

Attribute Property Description Type Default Value
selected-value selectedValue string ''
size size 'small' | 'regular' 'regular'
form-associated formAssociated boolean true
name name name property for use in conjunction with html forms string

Events

Event name Reactjs attribute Description
tpg-change ontpg-change Emitted when the state of the nested radio buttons change, contains the value of the newly selected button

Functions

Name Description Arguments
No functions found.

Slots

Name Description
Slot reserved for tpg-radio-button-items

CSS Parts

Attribute Description
No CSS parts found.

Sandbox