Vue burger button as a functional component, which is faster than the normal component, and very small (JS min + gzip is less than 700b and CSS min + gzip is less than 400b).
animated hamburger menu, vue js hamburger menu animation, mui hamburger menu, react hamburger menu npm, close hamburger menu on click javascript
How to make use of it:
Installation:
npm install vue-burger-button --save # Use the command bellow for Yarn. yarn add vue-burger-button
1. Import the BurgerButton component and its CSS.
<template> <burger-button :active="isActive" @click="isActive = !isActive" /> </template> <script> import BurgerButton from 'vue-burger-button'; export default { components: { BurgerButton }, data: () => ({ isActive: false }) }; </script> <style src="vue-burger-button/dist/vue-burger-button.css" />
2. If you need your <burger-button /> to be available everywhere, you can register it as a global component, and don’t forget to import its CSS.
import 'vue-burger-button/dist/vue-burger-button.css'; import Vue from 'vue'; import BurgerButton from 'vue-burger-button'; Vue.component('burger-button', BurgerButton);
Name | Type | Default | Description |
---|---|---|---|
active | Boolean | false | If true it switches to a close button. |
barColor | String | '#000000' | Change the bar’s colors. |
barHeight | Number | 10 | Change the bar heights. |
barWidth | Number | 80 | Change the bar widths. |
aniamted hamburger button component, vue-burguer-button Plugin/Github
See Demo And Download
Official Website(VitorLuizC): Click Here
This superior jQuery/javascript plugin is developed by VitorLuizC. For extra advanced usage, please go to the official website.