angular2-stretchy is an Angular2 directive that automatically adjusts input width to fit content.
https://tudorgergely.github.io/angular2-stretchy/
npm install angular2-stretchy
Add the declaration to your @NgModule:
import {StretchyModule} from 'angular2-stretchy';
...
@NgModule({
imports: [
StretchyModule
]
})
Use directly inside your HTML templates
<input stretchy />
Set normal styling on input such as min-width
<input stretchy style="min-width: 300px;"/>
This project is licensed under the MIT license. See the LICENSE file for more info.