Set disabled state in Vue Switch component

8 Aug 20231 minute to read

Switch can be disabled by setting the disabled property to true.

The following example illustrates how to disable support in Switch component.

<template>
  <ejs-switch disabled=true ></ejs-switch>
</template>

<script>
import Vue from 'vue';
import { SwitchPlugin } from "@syncfusion/ej2-vue-buttons";

Vue.use(SwitchPlugin);

export default {}
</script>

<style>
@import "../node_modules/@syncfusion/ej2-base/styles/fabric.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/fabric.css";

.e-switch-wrapper {
  margin-top: 18px;
}
</style>