0.0.1 • Published 6 years ago

fly-svelte-inline-input v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
6 years ago

fly-svelte-inline-input

An inline editable input component for Svelte. Displays as text and becomes editable by clicking or tapping.

Installation

npm install fly-svelte-inline-input

Browser

<script type="text/javascript" src="https://unpkg.com/svelte-inline-input/dist/index.mjs"></script>

Module

import InlineInput from 'fly-svelte-inline-input';

Usage

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

<InlineInput bind:value />

See the props table below for the available options.

Props

PropertyTypeDescriptionDefault
typestringThe input type. Could be text, number, textarea or selecttext
placeholderstringText to be shown as a placeholder while there is no inputempty string
labelClassesstringCSS classes for the label elementempty string
inputClassesstringCSS classes for the input elementempty string
rowsintegerTextarea rows2
colsintegerTextarea columns20
optionsarrayProvides the options for selects. Each object should have the format {label: x, value: x}[]

License

MIT

0.0.1

6 years ago