1603111860
yarn install vue-dock-menu
vue-dock-menu
has some great defaults. Please check the prop section for all available options.
The following snippet creates a simple Menubar and docks it to the top
of the page.
<template>
<vue-dock-menu :items="items">
</vue-dock-menu>
</template>
<script>
import { DockMenu } from "vue-dock-menu";
import "vue-dock-menu/dist/vue-dock-menu.css";
export default {
name: "example",
components: {
DockMenu
},
data() {
return {
items = [
{
name: "File",
menu: [{ name: "Open"}, {name: "New Window"}, {name: "Exit"}]
},
{
name: "Edit",
menu: [{ name: "Cut"}, {name: "Copy"}, {name: "Paste"}]
}
]
}
}
}
</script>
Name | Description | Default |
---|---|---|
dock | default docking position. Can be any one of TOP , LEFT , RIGHT , BOTTOM |
TOP |
on-selected | Callback that will be called on a menu item selection | |
items | Data for the Menu bar | [] |
theme | prop to customize the color theme | |
draggable | enables/disbales dragging on the menubar. | True |
use the dock
prop to dock the menubar to your preferred position. The prop can accept the following values TOP
, BOTTOM
, LEFT
, RIGHT
.
Here we dock the Menu bar to the right side of the screen.
<vue-dock-menu>
:items="items"
dock="RIGHT"
</vue-dock-menu>
The on-selected
prop is used to retrieve the selected menu item. The callback receives an object with name
and a path
property.
if you select the Copy
menu item under the Edit
menu, below would be the payload received on the on-selected
callback.
{
name: "Copy",
path: "edit>copy"
}
Use the items
prop to create Simple or Nested menus of your liking.
Here we create a simple Menu structure with 3 Menu items with Edit
and Open Recent
having sub menus.
const items = [
{ name: "New" },
{
name: "Edit",
menu: {
name: "edit-items",
},
},
{
name: "Open Recent",
menu: {
name: "recent-items",
},
},
]
<vue-dock-menu>
:items="items"
dock="BOTTOM"
</vue-dock-menu>
use the theme
prop to customize the colors of the menu bar.
<menu-bar
:items="items"
:on-selected="selected"
:theme="{
primary: '#001B48',
secondary: '#02457a',
tertiary: '#018abe',
textColor: '#fff'
}"
/>
# install dependencies
yarn install
# start dev
yarn run dev
# package lib
npm run rollup
# run css linting
yarn run lint:css
git checkout -b new-feature
)git commit -am 'Add feature'
)git push origin new-feature
)Prabhu Murthy – @prabhumurthy2 – prabhu.m.murthy@gmail.com
Distributed under the MIT license. See LICENSE
for more information.
https://github.com/prabhuingoto/
Author: prabhuignoto
Source Code: https://github.com/prabhuignoto/vue-dock-menu
#vue #vuejs #javascript
1600583123
In this article, we are going to list out the most popular websites using Vue JS as their frontend framework.
Vue JS is one of those elite progressive JavaScript frameworks that has huge demand in the web development industry. Many popular websites are developed using Vue in their frontend development because of its imperative features.
This framework was created by Evan You and still it is maintained by his private team members. Vue is of course an open-source framework which is based on MVVM concept (Model-view view-Model) and used extensively in building sublime user-interfaces and also considered a prime choice for developing single-page heavy applications.
Released in February 2014, Vue JS has gained 64,828 stars on Github, making it very popular in recent times.
Evan used Angular JS on many operations while working for Google and integrated many features in Vue to cover the flaws of Angular.
“I figured, what if I could just extract the part that I really liked about Angular and build something really lightweight." - Evan You
#vuejs #vue #vue-with-laravel #vue-top-story #vue-3 #build-vue-frontend #vue-in-laravel #vue.js
1618667723
how to create a Sidebar Menu using HTML and CSS only. Previously I have shared a Responsive Navigation Menu Bar using HTML & CSS only, now it’s time to create a Side Navigation Menu Bar that slides from the left or right side.
#sidebar menu using html css #side navigation menu html css #css side navigation menu bar #,pure css sidebar menu #side menu bar html css #side menu bar using html css
1578125521
Menus appear upon interaction with a button, action, or other control. They usually display a list of choices, with one choice per line, but can also show a rich content.
Here are the 20 Vue menu components I have collected very well.
A tiny Drawer component with bounced animation for Vue.
Create a dropdown like on Stripe.
A slide menu for vuejs.
A Highly Customizable, easy-to-use elegant dropdown component.
Feedback would be much appreciated, questions, suggestions, issues are more than welcome.
Lightweight and simple to use vue component that highlights menu items as you scroll the page, also scrolling to target section when clicked.
This Vue 2 component makes it simple to highlight a menu item with an ‘active’ class as you scroll.
A Vue.js Sidebar Menu Component.
An off-canvas sidebar Vue component with a collection of effects and styles using CSS transitions and SVG path animations.
Navigation tree menu component with nice integration with vue-router.
tree and multi-select component based on Vue.js 2.0 .
A simple, easier and highly customized menu solution.
Simple context-menu component built for Vue. Works well with both left and right clicks. Nothing too fancy, just works and is simple to use.
A simple yet flexible context menu for Vue. It is styled for the standard ul tag, but any menu template can be used. The only dependency this package has is Vue, so the majority of styling is up to you, and any package styles for the menu can easily be overridden.
The menu disappears when you expect by using the onblur event and it also disappears when clicked on.
Customizable draggable tree component for Vue.js
A highly customizable and blazing fast VueJs tree viewer.
A simple and easy to use Context Menu.
A reactjs, angular and vuejs tree component.
features
Download Source
custom node(vuejs and reactjs only)
Vuejs 3d menu component.
The effect refers to the menu in the upper right corner of the 2013 miaov official website.
A tree plugin for vue2.
Recent web applications are mainly for mobile environments. Therefore UIs premised on mouse operation such as window, context-menu, nested-menu and so on are no longer mainstream.
However the context-menu and nested-menu are still effective way to have operations on deeply structured data. This package is an implementation of {nested,context}-menu for PC environments as a Vue Component.
Vue component for fast create simple menu block
I will be glad to correct the inaccuracy of the my English
Simple menu component with a set of basic functionality, which is enought in 80% of cases
I hope you like them!
#vue-js #vue-menu #vue-menu-component #best-vue-menu
1593229920
Let us see the various types of menu in Android:
The Options Menu is a collection of options for an activity. It has a set of items that are useful to perform actions. It helps us to combine multiple actions together.
Following is an example of Options Menu:
Pop-Up menu is a menu that displays a list of items in a popup window. A pop-up menu appears below the view by default, in case there is no space, it appears above it.
A contextual menu is a floating menu. It appears only when the users long-press an element or right clicks on that. It generally affects the selected element.
#android tutorials #android menu #android menu types #contextual menu #menu android #menu in android #options menu #types of menu in android
1596114720
Vue 3 has not been officially released yet, but the maintainers have released beta versions for us punters to try and provide feedback on.
If you’re wondering what the key features and main changes of Vue 3 are, I’ll highlight them in this article by walking you through the creation of a simple app using Vue 3 beta 9.
I’m going to cover as much new stuff as I can including fragments, teleport, the Composition API, and several more obscure changes. I’ll do my best to explain the rationale for the feature or change as well.
We’re going to build a simple app with a modal window feature. I chose this because it conveniently allows me to showcase a number of Vue 3 changes.
Here’s what the app looks like in it’s opened and closed states so you can picture in your mind what we’re working on:
Rather than installing Vue 3 directly, let’s clone the project vue-next-webpack-preview
which will give us a minimal Webpack setup including Vue 3.
$ git clone https://github.com/vuejs/vue-next-webpack-preview.git vue3-experiment
$ cd vue3-experiment
$ npm i
Once that’s cloned and the NPM modules are installed, all we need to do is remove the boilerplate files and create a fresh main.js
file so we can create our Vue 3 app from scratch.
$ rm -rf src/*
$ touch src/main.js
Now we’ll run the dev server:
$ npm run dev
Straight off the bat, the way we bootstrap a new Vue app has changed. Rather than using new Vue()
, we now need to import the new createApp
method.
We then call this method, passing our Vue instance definition object, and assign the return object to a variable app
.
Next, we’ll call the mount
method on app
and pass a CSS selector indicating our mount element, just like we did with the $mount
instance method in Vue 2.
src/main.js
import { createApp } from "vue";
const app = createApp({
// root instance definition
});
app.mount("#app");
With the old API, any global configuration we added (plugins, mixins, prototype properties etc) would permanently mutate global state. For example:
src/main.js
// Affects both instances
Vue.mixin({ ... })
const app1 = new Vue({ el: '#app-1' })
const app2 = new Vue({ el: '#app-2' })
This really shows up as an issue in unit testing, as it makes it tricky to ensure that each test is isolated from the last.
Under the new API, calling createApp
returns a fresh app instance that will not be polluted by any global configuration applied to other instances.
Learn more: Global API change RFC.
#vue.js #components #composition api #design patterns #vue 3 #vue