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

vue-input-autowidth

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-input-autowidth

A Vue.js directive for adjusting a text input's width to fit its content.

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.7K
decreased by-10.14%
Maintainers
1
Weekly downloads
 
Created
Source

vue-input-autowidth Actions Status

A Vue.js directive for adjusting a text input's width to fit its content.

Demo

Install

$ yarn add vue-input-autowidth

or

$ npm install --save vue-input-autowidth

It's also available on Unpkg: https://unpkg.com/vue-input-autowidth

Usage

import VueInputAutowidth from 'vue-input-autowidth'

Vue.use(VueInputAutowidth)

// and in your template...
<input
  type="text"
  v-autowidth="{maxWidth: '960px', minWidth: '20px', comfortZone: 0}"
  v-model="name"
  placeholder="Watch me change size with my content!"
/>

Options

maxWidth

Type: String Default: 'none'

The maximum width the input field will grow to.

minWidth

Type: String Default: 'none'

The minimum width the input field will shrink to.

comfortZone

Type: Number Default: 0

The additional space in pixels to add to the far side of the input's content.

Development

# To run the example
$ npm run example

# To run the tests
$ npm test

# To publish the dist file
$ npm run build

License

MIT © Collin Henderson

Keywords

FAQs

Package last updated on 07 Mar 2021

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