Socket
Book a DemoInstallSign in
Socket

@techiediaries/ngx-textarea-autosize

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techiediaries/ngx-textarea-autosize

An Angular library for automatically adjusting textarea height to fit content

1.3.0
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

@techiediaries/ngx-textarea-autosize

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.

How to Install?

$ npm install @techiediaries/ngx-textarea-autosize

How to Use?

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>

Settings

NameDefaultTypeDescription
minRowsintegerSets minimal amount of rows of the textarea
maxRowsintegerSets maximum rows count after which autosizing if turned off and scrollbar appears
onlyGrowfalsebooleanControls if autosize should make the textarea smaller. In other words... should empty lines be trimmed?
useImportantfalsebooleanControls 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).



Keywords

angular

FAQs

Package last updated on 12 Aug 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.