Press "Enter" to skip to content

Animated Hamburger Button Component | vue-burger-button

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);

close-hamburger-menu-on-click

NameTypeDefaultDescription
activeBooleanfalseIf true it switches to a close button.
barColorString'#000000'Change the bar’s colors.
barHeightNumber10Change the bar heights.
barWidthNumber80Change 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.

Be First to Comment

    Leave a Reply

    Your email address will not be published.