{"_id":"@danielzotti/ng-textarea-autoresize","_rev":"1-17c84366d64ed950cdfef59243e525f1","name":"@danielzotti/ng-textarea-autoresize","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@danielzotti/ng-textarea-autoresize","version":"0.0.1","keywords":["angular","textarea","autoresize","resize","form","input form","text","angular8","directive"],"description":"It's a special angular directive that autoresize a textarea","repository":{"type":"git","url":"git+https://github.com/danielzotti/ng-textarea-autoresize.git"},"peerDependencies":{"@angular/common":"^8.1.2","@angular/core":"^8.1.2"},"main":"bundles/danielzotti-ng-textarea-autoresize.umd.js","module":"fesm5/danielzotti-ng-textarea-autoresize.js","es2015":"fesm2015/danielzotti-ng-textarea-autoresize.js","esm5":"esm5/danielzotti-ng-textarea-autoresize.js","esm2015":"esm2015/danielzotti-ng-textarea-autoresize.js","fesm5":"fesm5/danielzotti-ng-textarea-autoresize.js","fesm2015":"fesm2015/danielzotti-ng-textarea-autoresize.js","typings":"danielzotti-ng-textarea-autoresize.d.ts","metadata":"danielzotti-ng-textarea-autoresize.metadata.json","sideEffects":false,"dependencies":{"tslib":"^1.9.0"},"_resolved":"","_integrity":"","_from":"file:dist\\ng-textarea-autoresize\\danielzotti-ng-textarea-autoresize-0.0.1.tgz","bugs":{"url":"https://github.com/danielzotti/ng-textarea-autoresize/issues"},"homepage":"https://github.com/danielzotti/ng-textarea-autoresize#readme","_id":"@danielzotti/ng-textarea-autoresize@0.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-yF/r9X9iyB/3WQEOoMl+6PllWS/XG12vlxOWCOH2HoJ2zwxD7ofxIdU2GQJgSFgUZcigKf2TE7Nbu0Zg5w+1+Q==","shasum":"868cdb85660237208744890d961bd3465c2ab308","tarball":"https://registry.npmjs.org/@danielzotti/ng-textarea-autoresize/-/ng-textarea-autoresize-0.0.1.tgz","fileCount":23,"unpackedSize":67112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU784CRA9TVsSAnZWagAARdkQAJcMtLhz4wbsi3rP45rn\nvsDYHYKZBXjfuEwwjL5jWilmamxLS7kck4aaKMeDHceYCvRNfob6U39CNtvZ\n+1sn7Gz3B4y4KaMk18mBtejCouRMMNNRhp7J0Tx583uO3vf52qf7UAYL+E7S\n9Vvsl4HgsoCFmbf1320A/iChbdkSBb3nmAxkphuw+Z27bYGAgZsJSJrkGCvp\nxwO9l69VFn7mRjm+ESr8Ia60D0DQ3OkwjBlEcq6xEYRj/oJMHC8wnSkaVsV0\nHxgZ/y5FWldeb1+NEKgzyLUaCzcPQKaMd7goD2dAcv/SZZG51ZlaHuNKKcSI\nBb8xs1XhfQ2cSw1cSJBfmWq4QVTz7xZHB2LmohyTjwgFMStKaeXqu7ql9/TB\nTb70wJi0NZfoafgnE3XLEw0o4YW4do5huA5Zewiz4g01MgdGC9m4BPxtIDpY\nY46i2HHdjbGL7GHTCcrQOkSSYV53+IQPMCZMlnBw2TzypmROXhWn9XhXCBr+\n4YORHuJ3plkBckVy6LhyfNi0A4XCCWwmo0DeD/31rdQl/HKAKKlN/xxiRxR5\naHvz2MDrIFT5En/xYIoex/KWHQ9XeFTJDwSzrJ1V5y6V3ms6rmRqbsxhMLlq\nN+cn9eZw/ViONazGvoZLvNauUeLx50UwiUyRyy1u5xzoCnxiXqqNZSH7l4ZL\n3C/b\r\n=3i6Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDN2tD7wKqU+NbGO2kptPyBnjiCDU6wfak8sVid9dc0WAIhAO2B/Abj1HaS31PNVOqZ7mzLPYWtPaO04aAVBI5LK9jV"}]},"maintainers":[{"name":"danielzotti","email":"admin@danielzotti.it"}],"_npmUser":{"name":"danielzotti","email":"admin@danielzotti.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-textarea-autoresize_0.0.1_1565769527709_0.7947169577575408"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-14T07:58:47.490Z","0.0.1":"2019-08-14T07:58:47.897Z","modified":"2022-04-05T02:41:40.041Z"},"maintainers":[{"name":"danielzotti","email":"admin@danielzotti.it"}],"description":"It's a special angular directive that autoresize a textarea","homepage":"https://github.com/danielzotti/ng-textarea-autoresize#readme","keywords":["angular","textarea","autoresize","resize","form","input form","text","angular8","directive"],"repository":{"type":"git","url":"git+https://github.com/danielzotti/ng-textarea-autoresize.git"},"bugs":{"url":"https://github.com/danielzotti/ng-textarea-autoresize/issues"},"readme":"# @danielzotti/ng-textarea-autoresize\n\nIt's a special angular directive that autoresize a textarea based on the content.\nAutoresize is triggered on:\n\n- textarea content change\n- model change\n- window resize\n\n## Demo\n\nLive demo on github --> https://danielzotti.github.io/ng-textarea-autoresize\n\n## How to use it\n\n### Install the package\n\nRun `npm i @danielzotti/ng-textarea-autoresize --save`\n\n### Import the module\n\nImport `NgTextareaAutoresizeModule` from `@danielzotti/ng-textarea-autoresize` in `app.module.ts`\n\n```typescript\nimport { BrowserModule } from \"@angular/platform-browser\";\nimport { NgModule } from \"@angular/core\";\n\nimport { NgTextareaAutoresizeModule } from \"@danielzotti/ng-textarea-autoresize\";\n\nimport { AppComponent } from \"./app.component\";\n\n@NgModule({\n  declarations: [AppComponent],\n  imports: [BrowserModule, NgFilemanagerModule],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule {}\n```\n\n### Use it in a component\n\n#### Basic template\n\n- Easy to use\n\n```html\n<textarea autoresize></textarea>\n```\n\n#### Max height\n\n- Set max height in pixels on `autoresizeMaxHeight` attribute\n\n```html\n<textarea autoresize autoresizeMaxHeight=\"150\"></textarea>\n```\n\n#### Bind to model\n\n- Bind textarea content to a variable on `autoresize` attribute\n- Bind textarea max height to a variable on `autoresizeMaxHeight` attribute\n\n```html\n<textarea [autoresize]=\"text\" [autoresizeMaxHeight]=\"maxHeight\"></textarea>\n```\n\n```typescript\nimport { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-root\",\n  templateUrl: \"./app.component.html\",\n  styleUrls: [\"./app.component.scss\"]\n})\nexport class AppComponent {\n  maxHeight = 150; // pixels\n  text = \"This is the text for the textarea!\";\n}\n```\n","readmeFilename":"README.md"}