Skip to content

countnazgul/svelte-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Svelte Input Component

Started playing with Svelte and this is my first attempt to create re-usable component ... no one said that it will be useful :)

screenshot

Instalation

npm install svelte-custom-input

Properties

  • value - the text value to be displayed
  • showPlaceholder - (default true) show/hide placeholder
  • placeholder - (default PLACEHOLDER) the text for the placeholder
  • disabled - (default false) enable/disable the input

Usage

Somewhere is your Svelte code:

import svInput from 'svelte-custom-input'

let inputText = 'My input value'
let placeholder = 'Placeholder text'

And in the html part:

<svInput 
    bind:value={inputText} 
    showPlaceholder={true} 
    placeholder={placeholder} 
    disabled={false} 
/>

About

Small Svelte input box component ... just for testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published