All Projects → samturrell → Vue Breadcrumbs

samturrell / Vue Breadcrumbs

Licence: mit
Breadcrumbs for Vue.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Breadcrumbs

Wordpress Seo
Yoast SEO for WordPress
Stars: ✭ 1,301 (+779.05%)
Mutual labels:  plugin, breadcrumbs
Google Java Format Gradle Plugin
Stars: ✭ 147 (-0.68%)
Mutual labels:  plugin
Vue Comment Grid
💬 Responsive Vue.js comment system plugin that built with CSS Grid and Firebase REST API + Authentication. https://tugayyaldiz.github.io/vue-comment-grid
Stars: ✭ 143 (-3.38%)
Mutual labels:  plugin
Dspellcheck
Notepad++ Spell-checking Plug-in
Stars: ✭ 144 (-2.7%)
Mutual labels:  plugin
Live Composer Page Builder
Free page builder plugin for WordPress http://livecomposerplugin.com
Stars: ✭ 143 (-3.38%)
Mutual labels:  plugin
Gltfforue4
Import glTF 2.0 in Unreal Engine
Stars: ✭ 145 (-2.03%)
Mutual labels:  plugin
Convform
A jQuery plugin that transforms a form into an interactive chat.
Stars: ✭ 141 (-4.73%)
Mutual labels:  plugin
Iris.vim
📫 Simple mail client for Vim.
Stars: ✭ 148 (+0%)
Mutual labels:  plugin
Lagmonitor
Monitor performance of your Minecraft server. Similar to VisualVM and Java Mission Control.
Stars: ✭ 147 (-0.68%)
Mutual labels:  plugin
Nucleus
The Ultimate Essentials Plugin for Sponge.
Stars: ✭ 144 (-2.7%)
Mutual labels:  plugin
Sanic Cors
A Sanic extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible. Based on flask-cors by Cory Dolphin.
Stars: ✭ 143 (-3.38%)
Mutual labels:  plugin
Vue Plugin Boilerplate
🔩 Boilerplate for Vue.js plugin
Stars: ✭ 143 (-3.38%)
Mutual labels:  plugin
Sonar Cnes Report
Generates analysis reports from SonarQube web API.
Stars: ✭ 145 (-2.03%)
Mutual labels:  plugin
Serverless Sam
Serverless framework plugin to export AWS SAM templates for a service
Stars: ✭ 143 (-3.38%)
Mutual labels:  plugin
Mobarena
MobArena plugin for Minecraft
Stars: ✭ 147 (-0.68%)
Mutual labels:  plugin
React Native Wormhole
⚛️ 🌌 Inter-dimensional Portals for React Native. 👽 🖖
Stars: ✭ 133 (-10.14%)
Mutual labels:  plugin
Sheldon
A fast, configurable, shell plugin manager
Stars: ✭ 144 (-2.7%)
Mutual labels:  plugin
Flexget qbittorrent mod
flexget qbittorrent删种、辅种 自动签到 插件
Stars: ✭ 144 (-2.7%)
Mutual labels:  plugin
Git Self Blame
Stop trying to always blame others and take some responsibility already.
Stars: ✭ 148 (+0%)
Mutual labels:  plugin
Hugo Leetcode Dashboard
A LeetCode dashboard for hugo website
Stars: ✭ 148 (+0%)
Mutual labels:  plugin

vue-breadcrumbs

npm npm GitHub stars

Vue breadcrumbs builds on the official vue-router package to provide simple breadcrumbs. This package is backwards compatible to support both Vue 1.x and Vue 2.x.

DEMO

Installation

<script src="../dist/vue-breadcrumbs.min.js"></script>
Vue.use(VueBreadcrumbs)

or via npm:

$ npm install vue-breadcrumbs
import VueBreadcrumbs from 'vue-breadcrumbs'

Vue.use(VueBreadcrumbs)

Define the matching breadcrumb text in your routes.

An options object can also be passed into the plugin to specify your own template and rendering methods if desired. For example:

Vue.use(VueBreadcrumbs, {
  template: '<nav class="breadcrumb" v-if="$breadcrumbs.length"> ' +
    '<router-link class="breadcrumb-item" v-for="(crumb, key) in $breadcrumbs" :to="linkProp(crumb)" :key="key">{{ crumb | crumbText }}</router-link> ' +
    '</nav>'
});

By default the plugin will autoregister a breadcrumbs component which is globally accessible in your app (thanks to HermannBjorgvin. To disable this functionality you can set the registerComponent option to false when registering the component, like so:

Vue.use(VueBreadcrumbs, {
  registerComponent: false
});

Note: if referencing directly in the browser rather than as a module, there is no way to stop the default component from registering.

Usage

Vue 1.x

Use the breadcrumb: property of a route or subRoute, e.g.:

router.map({
  '/': {
    component: Page,
    breadcrumb: 'Home Page',
    subRoutes: {
      '/foo': {
        component: Foo,
        breadcrumb: 'Foo Page'
      },
      '/bar': {
        component: Bar,
        breadcrumb: 'Bar Page'
      }
    }
  }
})

Vue 2.x

Use the meta.breadcrumb: property of a route or child route, e.g.:

new VueRouter({
  routes: [
    {
      path: '/', 
      component: Page,
      meta: {
        breadcrumb: 'Home Page',
      },
      children: [
        {
          path: '/foo', 
          component: Foo,
          meta: {
            breadcrumb: 'Foo Page'  
          }
        },
        {
          path: '/bar', 
          component: Bar,
          meta: {
            breadcrumb: 'Bar Page'
          }
        }
      ]
    }
  ]
})

You can then render the breadcrumbs using the included <breadcrumbs> component or using your own markup logic with the global this.$breadcrumbs property which will return an array of active matched routes.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].