angular-auto-size-input
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Auto Size Input

Plug and Play directive to automatically scale textareas to their contents. Works while yout type, copy, cut, and paste.

How to use it

  1. npm i angular-auto-size-input
  2. import { AutoSizeInputModule } from 'angular-auto-size-input'; and add it to you Angular module
  3. Add the asAutoSizeInput directive to your textareas
<textarea
  asAutoSizeInput>
  Hello
</textarea>

Recommended styles (optional)

textarea.as-auto-size-input {
  display: block;
  width: 100%;
  border: 1px solid #ccc;
  outline: 0;
  padding: 4px;
  margin: 0;
  background: transparent;
  resize: none;
  box-sizing: border-box;
  overflow: hidden;
}

/angular-auto-size-input/

    Package Sidebar

    Install

    npm i angular-auto-size-input

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • asander