Step 1 : Download from yarn or npm
> yarn add pretty-checkbox-vue //or
> npm i --save pretty-checkbox-vue
Alternatively, you can also use CDN links
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pretty-checkbox@3.0/dist/pretty-checkbox.min.css">
<script src="https://cdn.jsdelivr.net/npm/pretty-checkbox-vue@1.1/dist/pretty-checkbox-vue.min.js"></script>
<script>
Vue.use(PrettyCheckbox);
</script>
Step 2 : Add dist/pretty-checkbox.min.css file from pretty-checkbox package and add dist/pretty-checkbox-vue.min.js file from pretty-checkbox-vue package in your html or import src/pretty-checkbox.scss file from pretty-checkbox package in your scss file
@import '~pretty-checkbox/src/pretty-checkbox.scss';
and import pretty-checkbox-vue in your js file
import PrettyCheckbox from 'pretty-checkbox-vue';
Vue.use(PrettyCheckbox);
or you can use it this way
import PrettyInput from 'pretty-checkbox-vue/input';
import PrettyCheck from 'pretty-checkbox-vue/check';
import PrettyRadio from 'pretty-checkbox-vue/radio';
Vue.component('p-input', PrettyInput);
Vue.component('p-check', PrettyCheck);
Vue.component('p-radio', PrettyRadio);
Step 3 : Add the mark up in your file. Can be used with Bootstrap, Foundation, Bulma frameworks.
<p-check name="check" color="success" v-model="check">Check</p-check>