vue-text-middle-ellipsis

Simple vue-directive for the text middle ellipsis.
1,560 9
Install
npm install vue-text-middle-ellipsis
Latest Version:1.0.13
Vue:2
License:MIT
Last Updated:Dec 12, 2022
Links: GitHub  ·  npm
Maintainer: tardigrada777

Vue Text Middle Ellipsis

npm version npm downloads

A Simple vue-directive for the text middle ellipsis.

Install

npm install vue-text-middle-ellipsis --save # or yarn add vue-text-middle-ellipsis
import Vue from 'vue';
import textMiddleEllipsis from 'vue-text-middle-ellipsis';

Vue.use(textMiddleEllipsis);

Usage

<p v-text-middle-ellipsis="4">Some long text.</p>

The value passed to the directive - is the count of symbols from the end of string that you are want to preserve from truncate.

Result

'Some...ext.'

Live example

Is it useful for you?

Please star this repo. Perhaps you have an idea how to improve this solution? Feel free to suggest your PR.

Related Packages

vue-line-clamp

A simple, fast and lightweight directive for truncating multi line texts using "...

192,440 87
vue-line-clamp-3

A vue 3 port of the original vue-line-clamp

36,996 1
vue-clamp

Clamping primitives for Vue.

831,413 842
@clampy-js/vue-clampy

Vue.js (2+) directive that clamps the content of an element by adding an ellipsi...

22,501 75
vue3-line-clamp

A simple, fast and lightweight vue 3 directive for truncating multi line texts.

11,226 1

Version History

Version Released Vue License
1.0.13 ^2.5.11 MIT
1.0.12 ^2.5.11 MIT
1.0.11 ^2.5.11 MIT
1.0.1 ^2.5.11 MIT
1.0.0 ^2.5.11 MIT