To make text automatically fit.
vue-line-fit
is a small component which fits its content to its dimensions.
npm install --save-dev vue-line-fit
or include build/bundle.js
.
# link the components up
components:
"line-fit": require "vue-line-fit"
# or:
"line-fit": window.vueComps.vueLineFit
<line-fit>some text to fit</line-fit>
For examples see dev/
.
Name | type | default | description |
---|---|---|---|
refit | Boolean | false | will refit on element resize |
letter-spacing | Boolean | false | will use css 'letter-spacing' to fill the whole box |
valign | Boolean | false | will align text vertically in the box |
Clone repository.
npm install
npm run dev
Browse to http://localhost:8080/
.
Copyright (c) 2016 Paul Pflugradt Licensed under the MIT license.