Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-input-autosize

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-input-autosize

A simple Vue.js directive to autosize text input fields

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue-input-autosize

Build Status

A simple Vue.js directive for autosizing a text input based on its content.

Install

$ npm install vue-input-autosize --save

or include the UMD build, hosted by npmcdn in a <script> tag:

<script src="//npmcdn.com/vue-input-autosize"></script>

Usage

import Vue from "vue";
import VueInputAutosize from "vue-input-autosize";

Vue.use(VueInputAutosize, { maxWidth: 500, minWidth: 20, comfortZone: 0 });

...and inside your template:

<input type='text' :value='msg' v-input-autosize />

Why bind to value instead of using v-model?

Currently, there's no easy way to track changes to a v-model value from a directive. However, since the value property of a text field controls its content, and is also a valid parameter to watch for updates from the directive, we can dynamically bind to that instead.

License

MIT © Collin Henderson

Keywords

FAQs

Package last updated on 25 Jul 2016

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc