sidebar-nav
v1.0.18
Published
Collapsible Navigation Sidebar
Downloads
228
Readme
sidebar-nav v1.0.18
Collapsible Sidebar Navigation
Installation
Using npm:
$ npm i --save sidebar-nav
Using yarn:
$ yarn add sidebar-nav
Usage
in app.js:
import SidebarNav from 'sidebar-nav';
then, to register it as a global component:
Vue.component('sidebar-nav', SidebarNav);
To use this component add a menu array to your root vue component:
e.g.
data: {
menu: [{
icon: 'fas fa-comment',
name: 'Messaging',
link: '/'
}, {
icon: 'fas fa-users',
name: 'Families',
link: '/'
}, {
icon: 'fas fa-user',
name: 'Contacts',
link: '/'
}]
}
Then use the component like this:
<sidebar-nav :menu="menu" side="right" sidebar-top="100px"></sidebar-nav>