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
list
prop (array of items) andon:sort
event handler - Supports both primitive values and objects in lists (requires
key
prop for objects) - Customizable item rendering through slots with access to
item
andindex
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
key
prop for unique identification
Event Handling:
on:sort
event 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 here. Navigate to an article, then pick the Feature on menu button