npm install somehow-input
**work-in-progress**
just some plug+play svelte components that I like to use:
flexible way to select a number within a range
<script>
let number = 3
</script>
<Number
bind:number="{index}"
min="{1}"
max="{4}"
hasSlider="{false}"
hasKeyboard="{false}"
/>
choose between an array of choices
<script>
let choices = ['a', 'b', 'c']
let choice = 'b'
</script>
<Choice bind:choice {choices} />
<script>
let text = 'foo'
</script>
<Text bind:text />
a color-based legend component
<script>
let colors = { '#dedded': 'LabelA', red: 'Label2' }
let selection = null
</script>
<legend bind:selection colors="{colors}" />
just a nice button, nothing else.
<button label="hi" color="red" onClick="{myFn}" />
<script>
let choices = ['a', 'b', 'c']
let choice = 'b'
</script>
<Tabs bind:choice {choices} />
MIT