Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

An autosizing directive for textarea elements in Angular 4+ applications

License

Notifications You must be signed in to change notification settings

MrSuttonmann/ng4-textbox-autosize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng4-textbox-autosize

An autosizing directive for textarea elements in Angular 4+ applications

Installation:

npm install ng4-textbox-autosize

Add declaration to @NgModule:

import {AutosizeDirective} from 'ng4-textbox-autosize';

...

@NgModule({
  declarations: [
    AutosizeDirective
  ]
})

Use directly inside your HTML templates by adding the word 'autosize' to any textarea.

<textarea autosize>Textarea content blah blah</textarea>

Options

Set either a minimum height:

<textarea autosize [minHeight]="60">Textarea content blah blah</textarea>

A maximum height:

<textarea autosize [maxHeight]="120">Textarea content blah blah</textarea>

Or both:

<textarea autosize [minHeight]="60" [maxHeight]="120">Textarea content blah blah</textarea>

Author

James Hyde

Licence

This project is licenced under the MIT licence. See the LICENSE file for more info.

About

An autosizing directive for textarea elements in Angular 4+ applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published