Radio button

Select one value in options or items list.

Code


                                                        
                                                        
                                                            <PyxisRadioButton
                                                            v-model="modelValue"
                                                            @update:modelValue="updateRadioButton"
                                                            value="option-1"
                                                            data-testid="radio-button"
                                                        />
                                                        
                                                            

Example of a regular RadioButton component

Props

The RadioButton component supports the following Props:

Name

Type

Default

Required

v-model

string

undefined

true

value

string

undefined

true

dataTestid

string

undefined

true

id

string

undefined

false

name

string

undefined

false

disabled

boolean

false

false

labelledBy

string

undefined

false

label

string

undefined

false

Events

The interactions on the RadioButton component are handled by the following Events

  • @update:modelValue : This event is emitted when the RadioButton component's state or data is updated
  • @change : This event is triggered when the selected RadioButton change.
  • @input : This event is emitted when there is an input action.