Vue Awesome Sidebar

About
Vue Awesome Sidbar is a powerfull, fast vue js(3x) sidbar navigation library with a set of components and slots that are flexible and customizable using sass and css which is very easy to use.
Demo
Check out Live demo at amirkian007.github.io/vasmenu
Features
- Built with typescript and vite with 0 dependants.
- Support for vue.js (3x) and nuxt.js (3x).
- Customization support for every component slots , CSS and SASS.
- Capable with Vue-router.
- Multiple Menu types(more will be added in the future).
- Complete RTL support.
- Dark and White mode support.
- Responsive design.
Installation
npm i vue-awesome-sidebar --save
or
yarn add vue-awesome-sidebar --save
Install the component globally.
Vue js 3:
Nuxt js 3:
or Install the component loacally :
Basic Usage
a simple example would be like this :
check out props for properites
Api
Props
Prop | Type | Default | Description |
---|---|---|---|
menu | Array | null | required - Array list of item properties |
menuType | string | simple | style of the menu can be either "fully" or "simple" |
collapsed | Boolean | false | sets menus collapsed state - should be used with v-model |
miniMenu | boolean | false | sets mini menus state - should be used with v-model |
width | string | 290px | sets width for menu |
widthMiniMenu | string | 65px | sets width for miniMenu |
autoCollapse | number | null | adds event listner to collapse menu when the given value(in px) is lower than the viewport width |
closeOnClickOutSide | Boolean | false | Adds event listner to collapse Menu when outside is clicked |
overLayerOnOpen | Boolean | false | Adds overlayer under the Menu when the menu is open - usefull on mobile |
childrenOpenAnimation | Boolean | true | opens menu items children with animation |
keepChildrenOpen | Boolean | flase | keeps children items opened when parent item is closed |
position | string | fixed | sets menu positiong - by default menu is fixed on viewport |
ChildrenOpenActiveRoute | Boolean | true | opens meneitem children on page-load if an item with active "href" inside and miniActive class is applied |
checkButtonActive | Boolean | true | checks if menuitems href is active, if so activeClass is added to it and miniActive class to the parent |
vueRouterEnabel | Boolean | true | when a meueitem is clicked vue-router will pushe the route to the items "href" property |
BottomMiniMenuBtn | Boolean | true | Adds mini menu toggle bottom to bottom of menu |
paddingTop | String | 0px | Adds padding to top of menu - usefull when using with app bar with higher z-index |
dark | Boolean | false | makes the theme of menu dark - color can be customized with sass vars |
rtl | Boolean | false | Makes the entire menu right to left align |
menu properties
Events
Event Name | Description |
---|---|
@item-click(MenuItem) |
fired when a menu item is clicked |
@update:collapsed(isCollapsed) |
fired when menu collapse state changes - should be used with "v-model" |
@update:miniMenu(isMiniMenu) |
fired when mini menu state changes - should be used with "v-model" |
Slots
Styling
Sass varibles
to use sass varibles import the SCSS file insted of Css, then import custom varibles,
example:
Sass varibles:
Css class
Contributing
License
vue-awesome-sidebar is open-sourced software licensed under the MIT license.