Reorderable
Reorder items in Lists and Grids in Jetpack Compose and Compose Multiplatform with drag and drop.
Install / Use
/learn @Calvin-LL/ReorderableREADME
Reorderable
Reorderable is a simple library that allows you to reorder items in LazyColumn, LazyRow, LazyVerticalGrid, LazyHorizontalGrid, LazyVerticalStaggeredGrid, and LazyHorizontalStaggeredGrid as well as Column and Row in Jetpack Compose and Compose Multiplatform with drag and drop.
The latest demo app APK can be found in the releases section under the "Assets" section of the latest release.
<table width="100%" align="center"> <thead> <tr> <th width="50%">LazyColumn</th> <th width="50%">LazyGrid</th> </tr> </thead> <tbody> <tr> <td width="50%"> <img src="lazy-column-demo.webp" width="320" alt="A video showing an item being reordered in a LazyColumn" /> </td> <td width="50%"> <img src="lazy-grid-demo.webp" width="320" alt="A video showing an item being reordered in a LazyGrid" /> </td> </tr> </tbody> </table>Used By
- Lawnchair
- Home Assistant
- ProtonVPN
- Pocket Casts
- gkd
- Mihon
- AB Download Manager
- ImageToolbox
- Aniyomi
- InnerTune
- StreetComplete
- HeliBoard
- EhViewer
- bilimiao
- Twine
- Neo Launcher
- Komikku
- Stream Chat
- EinkBro
Features
- Supports Compose Multiplatform (Android, iOS, Desktop/JVM, Wasm, JS)
- Supports items of different sizes
- Some items can be made non-reorderable
- Supports dragging and animating the first visible item
- Supports dragging immediately or long press to start dragging
- Supports section headers and footers
- Scrolls when dragging to the edge of the screen. (unavailable for
ColumnandRow) The scroll speed is based on the distance from the edge of the screen. - Uses the new [
Modifier.animateItem](<https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/LazyItemScope#(androidx.compose.ui.Modifier).animateItem(androidx.compose.an
