0.2.0 • Published 5 years ago
hamburgers-vue v0.2.0
Hamburgers Vue
Display a burger for menu as component, fork from github.com/jonsuh/hamburgers, you can choose hamburger animation with prop type
. Check jonsuh.com/hamburgers for examples.
Documentation
Install it with Yarn or NPM
yarn add -D hamburgers-vue
OR
npm i hamburgers-vue --save-dev
Import it, ES6 way, in main.js
/ app.js
file
import hamburger from 'hamburgers-vue'
Vue.use(hamburger)
For Nuxt.js
Create a plugin like plugins/hamburgers-vue.js
import Vue from 'vue'
import hamburger from 'hamburgers-vue'
Vue.use(hamburger)
In nuxt.config.js
import plugin
export default {
// ...
plugins: [
{ src: '@/plugins/hamburgers-vue', mode: 'client' },
],
// ...
}
In any .vue component import in with <client-only>
<template>
<client-only>
<hamburger />
</client-only>
</template>
Usage
Use it in a .vue
file
<template>
<div>
<hamburger />
</div>
</template>
Define type with prop type
<div>
<hamburger type="spring" />
</div>
API
Check all available type on jonsuh.com/hamburgers, use it in lowercase like this type="arrow"
Props | Type | Default | Describe |
---|---|---|---|
type | String | '3dx' | Type of hamburger animation |
License
MIT © @jonsuh, @ewilan-riviere