Skip to content

jsodeman/vue-bootstrap-toggle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synopsis

A VueJS wrapper for Bootstrap Toggle.

Prerequisites

  • jquery
  • bootstrap 3

Installation

npm install --save vue-bootstrap-toggle

Usage

<template>
  <div>
    <label>
      <bootstrap-toggle v-model="checked" :options="{ on: 'Yes', off: 'No' }" :disabled="false" />
    </label>
  </div>
</template>

<script>
import BootstrapToggle from 'vue-bootstrap-toggle'

export default {
  components: { BootstrapToggle },
  data() {
    return {
      checked: true
    }
  }
}
</script>

Troubleshooting

If the switches render correctly, but do not toggle when you click, make sure bootstrap-toggle.js isn't loaded somewhere in your HTML.

About

A VueJS wrapper for Boostrap Toggle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 68.8%
  • JavaScript 31.2%