Skip to content

vue-comps/vue-line-fit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-line-fit

To make text automatically fit.

vue-line-fit is a small component which fits its content to its dimensions.

Install

npm install --save-dev vue-line-fit

or include build/bundle.js.

Usage

# 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/.

Props

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

Development

Clone repository.

npm install
npm run dev

Browse to http://localhost:8080/.

License

Copyright (c) 2016 Paul Pflugradt Licensed under the MIT license.

About

analytically fit single line text to box

Resources

Stars

Watchers

Forks

Packages

No packages published