dz-angular2-autosize

Directive that automatically adjusts input width to fit content

Usage no npm install needed!

<script type="module">
  import dzAngular2Autosize from 'https://cdn.skypack.dev/dz-angular2-autosize';
</script>

README

angular2-autosize

angular2-autosize is a fork from (https://github.com/stevepapa/angular2-autosize). It was modified to work with input tags instead of textarea.

Use Example:

Add the declaration to your @NgModule:

import {AutosizeDirective} from 'angular2-autosize';

...

@NgModule({
  declarations: [
    AutosizeDirective
  ]
})

Use directly inside your HTML templates

<input autosize class="my-input" type="text">

Author

Steve Papa

Licence

This project is licensed under the MIT license. See the LICENSE file for more info.