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 :)
Instalation
npm install svelte-custom-input
Properties
value
- the text value to be displayedshowPlaceholder
- (defaulttrue
) show/hide placeholderplaceholder
- (defaultPLACEHOLDER
) the text for the placeholderdisabled
- (defaultfalse
) enable/disable the input
Usage
Somewhere is your Svelte
code:
let inputText = 'My input value'let placeholder = 'Placeholder text'
And in the html
part: