Programmatic Actions
Programmatic actions come from useDeckActions(). Use them for buttons,
external controls, or any app logic that should dismiss the active card.
Action Motion
motion controls manual drag feel. actionMotion controls only programmatic
actions such as swipeLeft() and swipeRight().
Recipes
SwipeDeckActionMotion.direct(options?)
Dismisses immediately toward the action direction. Omitted values reuse the deck's resolved dismiss duration, easing, and offscreen multiplier.
SwipeDeckActionMotion.springboard(options?)
Moves a little in the opposite direction first, then dismisses offscreen. During anticipation, swipe progress and live direction stay neutral so opposite-side overlays do not flash.
Precedence
actionMotion is replacement-based, not deep-merged:
- factory
actionMotionfromcreateSwipeDeck({ actionMotion }) Root actionMotion, replacing the factory default for that Root- per-call recipe passed to
swipeLeft(recipe)orswipeRight(recipe)
Actions are callback-safe. If a React Native press event is passed to
swipeRight or swipeLeft, the event argument is ignored and the configured
action motion is used.
