# ng2-fittext An Angular2 directive written in pure typescript (and without jquery!), inspired from http://fittextjs.com/, for autoscale the font size of an element to fit an upper level container. How many times your font doesn't scale automatically to fit the size of the container? Always, if you don't say it to do that! How you can say it? ng2-fittext! ### Demo http://plnkr.co/edit/v0TQaYepV4E2Heur02j5?p=preview ### Installation Install the library ```sh $ npm install --save ng2-fittext ``` ### Usage Import it in your Angular2 project like a directive 1) Declare it in your module ```sh import {FittextDirective} from "ng2-fittext/ng2-fittext"; @NgModule({ imports: [ ... ], declarations: [ FittextDirective ] }) ``` 1) Use it in your components ```sh import {Component} from '@angular/core'; @Component({ selector: 'label', template: `