vue-accordion
Simple accordion menu component for Vuejs
Note
The API has changed. Check v0.0.3 documentation if you use the old version.
Install
NPM / Yarn
Install the package:
npm install vue-accordion
Then import it in your project
import Vue from 'vue'
import {vueAccordion} from 'vue-accordion'
Vue.component('vue-accordion', vueAccordion)
Browser global
Just include vue & vue-accordion
If you just want to play around, unpkg has ready-to-use packages from NPM.
Then register the component:
Vue.component('vue-accordion', vueAccordion)
var vm = new Vue({
...
});
Usage
Simply use it like so:
Structure
Once the accordion has been rendered, it'll create the following structure: