Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
ActionsAndroid

Swipe actions

Expose logical start and end row actions with gesture alternatives.

Public APILumenSwipeActionsAndroid / Compose

Native example

Use Swipe actions

Use stable record keys. Transient gesture state resets before callbacks and never restores an operation. The application owns confirmation, undo, removal, and persistence.

Swipe actions rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulator
kotlin
LumenSwipeActions(
    startAction = LumenSwipeAction("Favorite", ::favorite),
    endAction = LumenSwipeAction("Delete", ::requestDeleteConfirmation, destructive = true)
) { LumenText("Quarterly report") }

Reference

Public API

The primary shared and platform-specific options exposed by LumenSwipeActions.

APIValues or typeDefaultDescription
startAction / endActionLumenSwipeAction?nullProvides a non-empty label, callback, enabled flag, and optional destructive intent.
enabledBooleantrueDisables gestures, buttons, and custom actions while busy.
modifierModifierModifierApplies outer layout.
content@Composable () -> UnitRequiredProvides native record content.

Native behavior

Design and accessibility

When to use it

Use stable record keys. Transient gesture state resets before callbacks and never restores an operation. The application owns confirmation, undo, removal, and persistence.

Accessibility

Provides RTL-aware gestures, named custom accessibility actions, and visible keyboard-usable action buttons.

Android docsCompose module