Documentation
Jatpack-Compose / SwipeActions
Showcases
Install
- Add
SwipeActions.ktfile to your project
Basic Usage
var isExpanded by remember { mutableStateOf(false) }
SwipeActionsRight(modifier = Modifier
.fillMaxWidth(0.95f)
.height(100.dp),
isExpanded = isExpanded, onChangedCard = { isExpanded = it }) {
Row(modifier = Modifier //Your Custom UI
.fillMaxWidth()
.fillMaxHeight()
.padding(15.dp),
horizontalArrangement = Arrangement.SpaceAround
) {
Column(modifier = Modifier.fillMaxHeight(),
verticalArrangement = Arrangement.SpaceAround) {
Text(
text = "Swipe Actions", color = Color.Black,
fontSize = 18.sp, fontFamily = FontFamily(Font(R.font.lato_bold))
)
Text(
text = "For more options, swipe the cardddd", color = Color.Black,
fontSize = 16.sp, fontFamily = FontFamily(Font(R.font.lato_regular))
)
}
}
}
- Toggle / Extend / Collapse
isExpanded = !isExpanded //switch status
isExpanded = true //open
isExpanded = false //close
- Required Parameters
SwipeActionsRight(isExpanded:Boolean, onChangedCard:(isExpanded:Boolean) -> Unit)
- Available parameters
modifier: Modifier = Modifier,
isExpanded:Boolean, numberOfActions:Int = 2,
onChangedCard:(isExpanded:Boolean) -> Unit,
type: Type = Type.Icon, iconPadding: Dp = 29.dp,
cornerRadius: Dp = 24.dp, itemWidth: Dp = 100.dp,
actionOneColor: Color = Color.Red, actionTwoColor: Color = Color.White,
actionOneText: String = "Delete", actionTwoText: String = "Mail",
actionOneImage: ImageVector = Icons.Rounded.Delete,
actionTwoImage: ImageVector = Icons.Default.Mail,
actionOneBackColor: Color = Color(0x5EA5A3A3),
actionTwoBackColor: Color = Color(0x5EA5A3A3),
cardBackground:Color = Color(0xFFCACACE),
actionOneClicked:() -> Unit = {}, actionTwoClicked:() -> Unit = {}
Want to see showcase?
See
MainActivity.ktfor some examplesInspired from https://github.com/aheze/SwipeActions
Similar Libraries
Compose Reorderable
Enables reordering by drag and drop in Jetpack Compose (Desktop) LazyList & LazyGrid.
Gesture
Fragula
🧛 Fragula is a swipe-to-dismiss extension for navigation component library for Android
GestureLibrary
Flippable
A Jetpack Compose library for animating a flip transition between the front and back of something, such as a card.
AnimationGesture
Draggable Scaffold
Compose library to drag to reveal
LibraryGesture
Browse by Category

Be the first to discover new Compose libraries
Curated Insights
Digest in 5 minutes or less
Android Analysis
Entertaining takes on happenings
Insider Tips
From top Android developers
Hidden Gems
You won't find elsewhere
"
"Dispatch is truly a newsletter, not just a digest of links. Vinay adds a delightful touch of humor and personality to a thoughtful analysis of the Android happenings of the month. I always learn something just by skimming it that makes me want to bookmark the issue now and dig deeper later."
— Zach Klippenstein
ex-Jetpack Compose Team @ Google, Square, Amazon
Join thousands of Android devs who look forward to Dispatch every week
© 2026 All Rights Reserved | Made by Vinay Gaba
