GithubHelp home page GithubHelp logo

ukchukx / vue-inline-input Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 346 KB

An inline editable input component

Home Page: https://www.npmjs.com/package/vue-inline-input

JavaScript 51.68% Vue 48.32%
editable inline-editor vue

vue-inline-input's Introduction

vue-inline-input

An inline editable input component for Vue.

Displays as text and becomes editable by clicking or tapping.

Example

You can read how it was built here

Installation

npm install vue-inline-input

Browser

<script type="text/javascript" src="https://unpkg.com/vue"></script>
<script type="text/javascript" src="https://unpkg.com/vue-inline-input"></script>
<script type="text/javascript">
  Vue.use(InlineInput);
</script>

Module

import InlineInput from 'vue-inline-input';

Usage

Once installed, it can be used in a template as:

<inline-input v-model="amount" />

See the props table below for the available options.

Props

Property Type Description Default
type string The input type. Could be text, number, textarea or select text
placeholder string Text to be shown as a placeholder while there is no input empty string
label-classes string CSS classes for the label element empty string
input-classes string CSS classes for the input element empty string
rows integer Textarea rows 2
cols integer Textarea columns 20
options array Provides the options for selects. Each object should have the format {label: x, value: x} []

Events

Event Description
blur Fired when the input element loses focus. Also provides the input element's value

Contribution

Install dependencies

npm install

When you're done, build the dist files

npm run build

License

MIT

vue-inline-input's People

Contributors

dependabot[bot] avatar ukchukx avatar

Stargazers

 avatar

Watchers

 avatar

vue-inline-input's Issues

Cant get blur event to fire

Hi there, I'm playing around with your input, but I can't bet the blur event to fire.

v-on:input and @input both work fine, but neither v-on:blur or @blur fire an event. Is there something I'm missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.