svelte-multivalue-box

1.0.2 • Public • Published

svelte-multivalue-box

svelte-multivalue-box gives you ability to select multiple values from a list of choices in a svelte project. The choice from the list of choices can bi searched by typing the input.

Installing svelte-multivalue-box

npm install svelte-multivalue-box

Using svelte-multivalue-box

<script>
import Box from 'svelte-multivalue-box';
 
let choices = [// your choices //];
let result;
</script>
 
<Box subjects={choices} bind:selectedSubjects={result} />

You can also set the number of letters to type before the list of choices is visible. Just set a prop threshold with number of letters.

<script>
import Box from 'svelte-multivalue-box';
 
let choices = [// your choices //];
let result;
</script>
 
<Box subjects={choices} threshold="2" bind:selectedSubjects={result} />

Default is 3

Adding custom placeholder

<script>
import Box from 'svelte-multivalue-box';
 
let placeholder = "Your placeholder here...";
let choices = [// your choices //];
let result;
</script>
 
<Box subjects={choices} placeholder={placeholder} bind:selectedSubjects={result} />

/svelte-multivalue-box/

    Package Sidebar

    Install

    npm i svelte-multivalue-box

    Weekly Downloads

    2

    Version

    1.0.2

    License

    none

    Unpacked Size

    11.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • shaanu1404