Stripe Menu is a Vue.js component to create a minimal clean dropdown nav menu just like you see on the Stripe app.
Basic usage:
1. Import and register the Stripe Menu component.
// globally import { createApp } from 'vue' import VueStripeMenu from 'vue-stripe-menu' createApp({}).use(VueStripeMenu)
// locally import { VsmMenu, VsmMob } from 'vue-stripe-menu' export default { components: { VsmMenu, VsmMob } }
2. Insert the stripe menu component into your template.
<template> <vsm-menu :menu="menu"> <template #default="{ item }"> <div style="width: 300px; padding: 30px"> Dropdown content - {{ item.title }} </div> </template> <template #before-nav> <li class="vsm-mob-full"> Left side </li> </template> <template #after-nav> <li class="vsm-mob-hide"> Right side </li> <vsm-mob> <div style="min-height: 200px; padding: 30px"> Mobile Content </div> </vsm-mob> </template> </vsm-menu> </template>
3. Define the menu items.
export default { data() { return { menu: [ { title: 'Item1', dropdown: 'dropdown-1' }, { title: 'Item2', dropdown: 'dropdown-2' }, { title: 'Just link', attributes: { href: '#clicked' } }, ] } } }
Preview:
Changelog:
v3.0.0beta1 (10/02/2022)
- Updated for Vue 3
v2.0.0 (06/27/2021)
- menu: add align props
- fixed mobile: emit v-model props on vue-3
v2.0.0 (04/10/2021)
- Added the ability to customize styles in realtime via Demo Website
- Added a simplified demo of the component to the #Install section
- Replace default bundle from vue-stripe-menu.common.js to vue-stripe-menu.umd.min.js
- Fixed animation with problematic dropdown-transition (see new transition-timeout props)
- Now, when the screen width changes window.addEventListener(‘resize’), the following happens: dropdown is open – location is being recalculated (resizeDropdown function); dropdown is closed – improved logic of instant destruction of styles
- Added the ability not to install the component globally
- Add styles
- Change the code/styles according to the changes below
- Style changes
- Classes changes
v1.5.0 (11/17/2020)
- Added closeDropdown() method for Mobile component
v1.4.0 (09/03/2020)
- Delete core-js library from dependecies
v1.3.1 (09/03/2020)
- Fix hide dropdown after scroll on mobile browser
v1.3.0 (08/25/2020)
- New handler props
- Bump libraries + audit fix
v1.2.12 (08/06/2020)
- Bump libraries + audit fix
v1.2.11 (05/25/2020)
- Bugfix
Download Details:
Author: oleksiikh
Live Demo: https://oleksiikhr.github.io/vue-stripe-menu/
Download Link: https://github.com/oleksiikhr/vue-stripe-menu/archive/refs/heads/main.zip
Official Website: https://github.com/oleksiikhr/vue-stripe-menu
Install & Download:
# Yarn
$ yarn add vue-stripe-menu
# NPM
$ npm install vue-stripe-menu --save