Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sbruhns/vue-v-tribute

vue wrapper for tributejs (https://github.com/zurb/tribute)
https://github.com/sbruhns/vue-v-tribute

Last synced: about 2 months ago
JSON representation

vue wrapper for tributejs (https://github.com/zurb/tribute)

Awesome Lists containing this project

README

        

# vue-v-tribute
vue wrapper for tributejs (https://github.com/zurb/tribute)

## Setup

```
npm i vue-v-tribute
```

## Provide default tributejs options for Vue Plugin

You can provide any option supported by tributejs https://github.com/zurb/tribute/blob/master/src/Tribute.js#L8-L33

```ts
...
import VueVTribute from 'vue-v-tribute'
...

Vue.use(VueVTribute, {
noMatchTemplate: () => null,
lookup: 'name',
menuItemTemplate: (item: TributeItem) => {
return `${item.original.name} - ${item.original.username}`;
},
selectTemplate: function(item: TributeItem) {
return '@' + item.original.username;
},
});
```

## Use as directive

```html
...


...
```

## Use as directive on wrapper element or wrapper component

```html
...


...
```