Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple library that autosizes your textareas.

License

NotificationsYou must be signed in to change notification settings

bravobit/ngx-autosize

Repository files navigation

Autosize your textareas with ease.

npm versionnpm license

  • Use⌘ Command +F orctrl +F to search for a keyword.
  • Contributions welcome, please seecontribution guide.

Features

  • Easy implementation
  • Library can be consumed by Angular CLI, Webpack, or SystemJS
  • Compatibility
    • Angular Universal
    • Ahead-Of-Time compilation (AOT)
    • Lazy loading

Demo

Click here to play with the example

Installation

To use ngx-autosize in your project install it vianpm oryarn:

$ npm install @bravobit/ngx-autosize --save# or$ yarn add @bravobit/ngx-autosize

Setup

Add theNgxAutosizeModule to your imports array in yourAppModule.

import{BrowserModule}from'@angular/platform-browser';import{NgModule}from'@angular/core';import{NgxAutosizeModule}from'@bravobit/ngx-autosize';import{AppComponent}from'./app.component';@NgModule({imports:[BrowserModule,NgxAutosizeModule],declarations:[AppComponent],bootstrap:[AppComponent]})exportclassAppModule{}

Example

import{ChangeDetectionStrategy,Component}from'@angular/core';@Component({selector:'app-root',template:`        <textarea ngxAutosize                  minHeight="100px"                  maxHeight="500px">Woop die floop</textarea>    `,styles:['textarea { resize: none; }'],changeDetection:ChangeDetectionStrategy.OnPush})exportclassAppComponent{}

About

A simple library that autosizes your textareas.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp