svelte-sortable-list
- Renders a sortable list with drag-and-drop reordering functionality
- Implements FLIP animations for smooth transitions when adding/removing/reordering items
- Built specifically for Svelte framework
Key Features:
- Requires
listprop (array of items) andon:sortevent handler - Supports both primitive values and objects in lists (requires
keyprop for objects) - Customizable item rendering through slots with access to
itemandindex
Target Audience:
Svelte developers needing interactive, animated sortable lists
Customization:
- Default renders items as
<p>tags - Slot allows complete control over item rendering
- Supports object arrays via
keyprop for unique identification
Event Handling:
on:sortevent provides updated list inevent.detail
Examples:
- Basic usage with string array
- Advanced usage with object array and custom components
Basic Example ↗
Complete Example ↗
svelte
Featured Stories
No featured articles.