Skip to content

SwipeAction

A swipeable list item that reveals action buttons on the left or right side. Commonly used in message lists and item management.

Basic Usage

vue
<script setup>
const leftActions = [
  { text: 'Read', value: 'read', background: '#07c160' },
]
const rightActions = [
  { text: 'Delete', value: 'delete', background: '#ee0a24' },
]
</script>

<template>
  <see-swipe-action
    :left-actions="leftActions"
    :right-actions="rightActions"
    @click="onAction"
  >
    <view class="item">Swipe me left or right</view>
  </see-swipe-action>
</template>

Props

PropTypeDefaultDescription
leftActionsobject[][]Left-side action buttons { text, value, background?, color?, disabled? }
rightActionsobject[][]Right-side action buttons { text, value, background?, color?, disabled? }
isDisabledbooleanfalseWhether the swipe action is disabled
thresholdnumber0.3Swipe distance ratio to trigger action (0-1)
isCloseOnClickbooleantrueWhether to close after clicking an action
namestring''Unique identifier for the item

Events

EventParametersDescription
onClick(action: object, position: string)Triggered when an action button is clicked
onOpen(position: string)Triggered when action panel is opened
onClose(position: string)Triggered when action panel is closed

Liao ICP No. 2025070134