JSFiddle - React, Tailwind, and code Playground

by atilkan

HTML

<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
<el-switch v-model="value2" active-color="#13ce66" inactive-color="#ff4949" :width="54">
</el-switch>
</div>

SCSS

@import url("//unpkg.com/[email protected]/lib/theme-chalk/index.css");

.el-switch {
    width: 54px;
  height: 24px;
  line-height: 24px;
}

.el-switch.is-checked .el-switch__button {
  transform: translate3d(30px, 0px, 0px)!important
}

.el-switch__core {
    width: 54px;
  height: 24px;
  border-radius: 24px;
}

.el-switch__core .el-switch__button {
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
}

Babel + JSX

var Main = {
    data() {
      return {
        value1: true,
        value2: true
      }
    }
  };
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')