1.0.1 • Published 6 years ago

x-lines v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

x-lines

Crop your text to fit it into X lines.
View demo

Installation

npm i x-lines   # or yarn add x-lines

Usage

Vanilla

import { initCropper } from "x-lines"

const el = document.getElementById("foobar")

initCropper({ el, lines: 2 })

Vue directive

<template>
  <div v-crop-lines="2">Hello world</div>
</template>

<script>
import { cropLinesDirective } from "x-lines/vue"

export default {
  directives: {
    cropLines: cropLinesDirective
  }
}
</script>