1.0.7 • Published 2 years ago

vue-tribute v1.0.7

Weekly downloads
5,107
License
MIT
Repository
github
Last release
2 years ago

vue-tribute test

A tiny Vue.js wrapper around Zurb's Tribute library for ES6 native @mentions.

🚦 Looking for Vue 2 support? Check out the master branch.

Install

$ npm install vue-tribute@next --save
# or...
$ yarn add vue-tribute@next

or

Use the UMD build from Unpkg, available as VueTribute in the global scope.

<script src="/vendor/vue.js" />
<script src="https://unpkg.com/vue-tribute@next" />

Globally

Import and register the module as a plugin.

import { createApp } from 'vue'
import App from './App.vue'
import VueTribute from 'vue-tribute'

createApp(App).use(VueTribute).mount('#app')

Per-component

import { VueTribute } from 'vue-tribute'

export default {
  components: { VueTribute },
  setup() {
    ...
  },
}

Usage

Wrap a single text input, textarea, or contenteditable element within the VueTribute component. You should then pass a valid Tribute collection(s) object to the component.

Events

All custom Tribute events will work as expected. Simply attach listeners for them like you would any other event.

<template>
  <vue-tribute :options="options">
    <input type="text" placeholder="@..." @tribute-replaced="doSomething" />
  </vue-tribute>
</template>

License

MIT © Collin Henderson

2.0.0

2 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

0.2.0

7 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago