JSPM

angular-autosize

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 156
  • Score
    100M100P100Q83324F
  • License MIT

Automatically resize textarea height based on its content

Package Exports

  • angular-autosize

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angular-autosize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

angular-autosize

Directive to automatically resize a textarea to fit its content. The most comprehensive Angular 2+ textarea directive that follows material standards.

Installation

npm install angular-autosize

Usage

  1. Import and declare the directive in your main App Module:
import { AutosizeDirective } from 'angular-autosize';

@NgModule({
  declarations: [
    AutosizeDirective
  ]
})
  1. Use the directive inside a textarea element in HTML:
<textarea autosize>Autosized textarea for Angular 2 and above</textarea>
  1. Optionally, specify minRows and maxRows boundaries
<textarea autosize autosizeMinRows="5" autosizeMaxRows="10">Autosized textarea that expands from 5 to 10 rows</textarea>

License

MIT