Toggle button

Boolean action (inactive/active)

Code


                                                        
                                                        
                                                            <PyxisToggleButton
                                                            @update:toggle="updateToggle"
                                                            v-model="modelValue"
                                                            data-testid="radio-button"
                                                        />
                                                        
                                                            

Example of a regular ToggleButton component

Props

The ToggleButton component supports the following Props:

Name

Type

Default

Required

dataTestid

string

undefined

true

v-model

boolean

false

false

label

string

undefined

false

id

string

undefined

false

name

string

undefined

false

disabled

boolean

false

false

labelledBy

string

undefined

false

Events

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

  • @update:modelValue : This event is emitted when the ToggleButton component's state or data is updated and returns its value