1.0.4 • Published 2 months ago

vue3-read-time v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Vue 3 Read Time

Plugin vue 3 to caculate reading time paragraph

Install

npm install vue3-read-time

Configuration

import { createApp } from "vue";
import App from "./App.vue";
import { vueReadTime } from 'vue3-read-time';

const app = createApp(App);
app.use(vueReadTime);
app.mount("#app");

Usage

<script setup lang="ts">
import { type ReadTimeConfiguration } from 'vue3-read-time'
import { ref } from "vue";
const readTime=ref('');
const readTimeConfig: ReadTimeConfiguration={
  wordsPerMinute: 200,
  readTimeCalculated(time) {
    console.log(time);
    readTime.value=time;
  },
}
</script>

<template>
  <h1>Read Time: {{readTime}}</h1>
  <div v-readTime="readTimeConfig">
    Lorem ipsum dolor sit amet 
  </div>
</template>
1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago