Getting Started

This section will help you with the basic installment of vue-timeago3.

  • Step. 1: Install vue-timeago3

Currently, the package is available via NPM and Yarn. To install it use one of the two package managers.

NPM

 npm install vue-timeago3

Yarn

 yarn add vue-timeago3
  • Step. 2: Register Plugin

To register the plugin simply import and register it using the new global vue3 api. As an alternative the plugin could be imported in specific components only.




 



 



// src/main.ts
import App from './App'
import { createApp } from 'vue'
import timeago from 'vue-timeago3'

const app = createApp(App)
...
app.use(timeago) // register timeago
...
app.mount('#app')
  • Step. 3: Enjoy!

Congratulations, you've successfully installed vue-timeago3. You can now start using the component, or configure it on a global level.