KasyKasy

Swipe Action

Live preview and documentation for the Swipe Action component.

Preview

componentPreview.loading

About

Wraps any child to let it be dragged horizontally and trigger an action — the most common case is deleting an item from a list.

  • tone: destructive (default, red background) or neutral (neutral background, e.g. archive/snooze)
  • direction: endToStart (default, drag from right to left), startToEnd, or both
  • icon: icon shown behind the revealed item (default: trash can)
  • label: optional text next to the icon
  • onDismissed: callback fired when the dismiss completes
  • KasySwipeAction.withConfirm constructor: takes confirm (Future<bool> Function()) to ask for confirmation before dismissing — returning false snaps the card back into place

Requires a Key (usually ValueKey(item.id)), since it uses Flutter's Dismissible under the hood.

Last updated on 08/23/2026

On this page