├── .gitignore
├── LICENSE
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
└── index.html
├── src
├── App.vue
├── assets
│ └── logo.png
├── components
│ ├── Menu.vue
│ ├── Menu
│ │ ├── bubble.vue
│ │ ├── elastic.vue
│ │ ├── fallDown.vue
│ │ ├── push.vue
│ │ ├── pushRotate.vue
│ │ ├── reveal.vue
│ │ ├── scaleDown.vue
│ │ ├── scaleRotate.vue
│ │ ├── slide.vue
│ │ └── stack.vue
│ └── index.js
└── main.js
├── vue.config.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw*
22 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018-present, Mohit Bajoria
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-burger-menu [](https://github.com/prettier/prettier)
2 |
3 | [](https://www.npmjs.com/package/vue-burger-menu)
4 |
5 | [](https://twitter.com/intent/tweet?url=https%3A%2F%2Fvue-burger-menu.netlify.com%2F&via=mbj36&text=Checkout%20vue-burger-menu&hashtags=%23vuejs)
6 |
7 | An off-canvas sidebar Vue component with a collection of effects and styles using CSS transitions and SVG path animations.
8 |
9 | ## Demo & examples
10 |
11 | Live demo - https://vue-burger-menu.netlify.com/
12 |
13 | To build the examples locally, run:
14 |
15 | ```
16 | npm i
17 | npm run serve
18 | ```
19 |
20 | ```
21 | yarn
22 | yarn serve
23 | ```
24 |
25 | Then open [`localhost:8080`](http://localhost:8080) in a browser
26 |
27 | ## Installation
28 |
29 | ```
30 | npm install vue-burger-menu --save
31 | ```
32 |
33 | ```
34 | yarn add vue-burger-menu
35 | ```
36 |
37 | ## Usage
38 |
39 | Items should be passed as child elements of the components
40 |
41 | ```javascript
42 | import { Slide } from 'vue-burger-menu' // import the CSS transitions you wish to use, in this case we are using `Slide`
43 |
44 | export default {
45 | components: {
46 | Slide // Register your component
47 | }
48 | }
49 | ```
50 |
51 | In your template
52 |
53 | ```
54 |
55 |
56 |
57 | Home
58 |
59 |
60 |
61 | ```
62 |
63 | ### Animations
64 |
65 | The example above imported `slide` which renders a menu that slides in on the page when the burger icon is clicked. To use a different animation you can subsitute slide with any of the following
66 |
67 | * Slide
68 | * ScaleDown
69 | * ScaleRotate
70 | * Reveal
71 | * Push
72 | * PushRotate
73 |
74 | ATTENTION - the below animations are in WIP
75 |
76 | * FallDown
77 | * Stack
78 | * Elastic
79 | * Bubble
80 |
81 | ### Properties
82 |
83 | Some animation require certain other elements on your page
84 |
85 | * Page wrapper - an element wrapping the rest of the content on yur page, placed after the menu component
86 |
87 | ```javascript
88 |
89 |
90 |
91 | .
92 | .
93 |
94 |
95 | ```
96 |
97 | * Outer container called `app` - an element containing everything including the menu component
98 |
99 | ```javascript
100 |