Search results

Set the disabled state in Vue RadioButton component

03 Mar 2021 / 1 minute to read

RadioButton component can be enabled/disabled by giving disabled property. To disable RadioButton component, the disabled property can be set as true.

The following example illustrates how to disable a radio button and the selected one is displayed using change event.

Copied to clipboard
<li><div id="text">Selected: Option 1</div></li>
<li> <ejs-radiobutton label="Option 1" name="default" checked="true" :change="onChange" ></ejs-radiobutton></li>
<li> <ejs-radiobutton label="Option 2" name="default" disabled="true" :change="onChange"></ejs-radiobutton></li>
<li> <ejs-radiobutton label="Option 3" name="default" :change="onChange"></ejs-radiobutton></li>

import Vue from 'vue';
import { RadioButtonPlugin } from '@syncfusion/ej2-vue-buttons';
import { enableRipple } from '@syncfusion/ej2-base';


export default {
  methods: {
    onChange: function(args) {
      document.getElementById('text').innerText = 'Selected : ' +[0].label;

  @import '../node_modules/@syncfusion/ej2-base/styles/material.css';
  @import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';;

.e-radio-wrapper {
  margin-top: 18px;

li {
  list-style: none;

#text {
  font-size: 16px;