Svelecte is fully featured and customizable select/multiselect/autocomplete.
Features
- searchable
- multiselect with limit of max selected items
- allow simple array or complex objects as items
- custom item renderering, multiple snippets
- allow creating new items
- remote data fetching
- themable with CSS variables
- virtual list support
- i18n support
- SSR support
- a11y
- drag & drop support (see examples)
- usable as custom element
Install
npm install svelecte
npm install svelecte
For svelte 3/4 use v4
npm install svelecte@4
npm install svelecte@4
Getting started
Minimal example:
<script>
import Svelecte from 'svelecte';
let value;
</script>
<Svelecte
options={['One', 'Two', 'Three']}
bind:value
/>
<script>
import Svelecte from 'svelecte';
let value;
</script>
<Svelecte
options={['One', 'Two', 'Three']}
bind:value
/>
Result: