🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

vue-line-clamp

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-line-clamp

A simple, fast and lightweight directive for truncating multi line texts using "cross-browser" CSS strategies.

1.0.0
Source
npm
Version published
Weekly downloads
5.1K
21.24%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Line Clamp

A simple, fast and lightweight directive for truncating multi line texts using "cross-browser" CSS strategies.

Demo: https://codepen.io/Frondor/pen/ypvPEQ

Install

npm install --save vue-line-clamp
import Vue       from 'vue'
import lineClamp from 'vue-line-clamp'

Vue.use(lineClamp, {
  // plugin options
})

Usage

<p v-line-clamp="2">Some long text with multiple lines that needs to be truncated to a fixed number, which is 2 in this case.</p>

Plugin options

propertytypedefaultdescription
includeCssBooleantrueSet to false if you're providing your own style, or just importing it from within your style bundler or pre-processor

Caveats

Probably there may be problems when loading custom fonts. I've done some tests and couldn't detect any inconsistence so far, so feel free to open an issue and provide code to reproduce any bug or glitch you find.

Keywords

vue

FAQs

Package last updated on 10 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts