项目
在 GitHub 查看 Svelecte
mskocik/svelecte
关于
使用 Svelte 编写的灵活自动完成/选择组件
网站与应用开发可以做什么
- multiselect with limit of max selected items
- allow simple array or complex objects as items
- custom item renderer (formatter)
- allow creating new items (and possibly edit them)
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Svelecte 

Flexible autocomplete/select component written in Svelte. Initially inspired by Selectize.js. Also usable as custom element. Usable in forms, behaves very similar to standard <select> element.
See the latest changes on the Releases page.
📃 Features
- searchable
- multiselect with limit of max selected items
- allow simple array or complex objects as items
- custom item renderer (formatter)
- allow creating new items (and possibly edit them)
- remote data fetch
- virtual list support
- i18n and basic ARIA support
- SSR support
- client-validation support (tested with sveltekit-superforms)
- lazy dropdown rendering
- usable as custom element
- customizable styling
- dnd intergration with
svelte-dnd-action
🔧 Installation
npm install svelecte
[!NOTE] For Svelte 4 use version 4. Version 5 is svelte 5 only ⚡
Minimalistic example
<script>
import Svelecte from 'svelecte';
const list = [{ id: 1, name: 'Item 1' }, { id: 2, name: 'Item 2'}, ...];
let myValue = null;
</script>
<Svelecte options={list} bind:value={myValue}></Svelecte>
Visit documentation for more details.
Thanks to
- selectize.js - main inspiration
- sifter - search engine
- svelte-tiny-virtual-list virtual list functionality for v3, v4
- and svelte of course 😊
And if you want to thank me, you can through my sponsor page.
License
探索相关项目
加载中…