
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@techiediaries/ngx-textarea-autosize
Advanced tools
An Angular library for automatically adjusting textarea height to fit content
ngx-textarea-autosize is an Angular directive that automatically adjusts textarea height to fit its content.
It adjusts the textarea height automatically to any text input, or changes to the model bound to the textarea.
$ npm install @techiediaries/ngx-textarea-autosize
First import the module as follow:
import {AutosizeModule} from '@techiediaries/ngx-textarea-autosize';
...
@NgModule({
imports: [
AutosizeModule
]
})
Use directly inside your HTML templates
<textarea autosize>
Angular 10 example
</textarea>
Name | Default | Type | Description |
---|---|---|---|
minRows | integer | Sets minimal amount of rows of the textarea | |
maxRows | integer | Sets maximum rows count after which autosizing if turned off and scrollbar appears | |
onlyGrow | false | boolean | Controls if autosize should make the textarea smaller. In other words... should empty lines be trimmed? |
useImportant | false | boolean | Controls if autosize should include !important in its height css styles. Should only need to be used if the height of the textarea is being overridden elsewhere |
Example
You need to implement 'onResized' yourself
## Credits
This library is based
[http://stevepapa.com/angular2-autosize](http://stevepapa.com/angular2-autosize)
and [ngx-autosize](https://www.npmjs.com/package/ngx-autosize).
FAQs
An Angular library for automatically adjusting textarea height to fit content
We found that @techiediaries/ngx-textarea-autosize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.