Skip to content

JeronimasDargis/vue-telescope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-telescope

Vue telescope is a simple text truncation lib for your Vue3 projects

latest version on npm npm downloads a month bundlephobia minified size

How to use

npm i vue-telescope
import { createApp } from "vue";
import App from "./App.vue";
import telescope from 'vue-telescope'
import "./assets/styling/index.css";

const app = createApp(App)

app.use(telescope)
app.mount('#app')
<template>
 <p v-telescope="{ length: 12 }">truncated text</p>
</template>

Or use dynamic values to pass length

<template>
  <button @click="state.textLength++">truncated text length is: {{ state.textLength }}</button>
  <p v-telescope="{ length: state.textLength }">truncated text</p>
</template>

Output

image

Settings

{length: Number}

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published