Swipeable List Item
A list row that reveals actions when the user swipes it left or right — the classic iOS Mail interaction.
Basic Usage
Swipe to reveal actions
Drag a row left to reveal Archive + Delete, drag right to reveal Star. Tap a revealed action to trigger it.
import { SwipeableListItem } from 'fluxo-ui';
<SwipeableListItem
rightActions={[
{ label: 'Archive', icon: <ArchivedIcon />, color: 'warning', onTrigger: archive },
{ label: 'Delete', icon: <TrashIcon />, color: 'danger', onTrigger: remove },
]}
leftActions={[
{ label: 'Star', icon: <StarIcon />, color: 'primary', onTrigger: star },
]}
>
<div>Subject line — preview text…</div>
</SwipeableListItem>Variants
Inline variant (default)
Flush list rows — best for traditional list views.
Card variant
Each row is a rounded card with a subtle border — works well for tile-like list patterns.
Compact variant
Tighter padding and smaller text for dense lists.
<SwipeableListItem variant="card" rightActions={...}>
{/* row body */}
</SwipeableListItem>Full-swipe trigger
Full-swipe to trigger
Set fullSwipe on an action and swipe past 70% — the action fires automatically without a tap.
<SwipeableListItem
rightActions={[
{ label: 'Delete', icon: <TrashIcon />, color: 'danger', fullSwipe: true, onTrigger: remove },
]}
fullSwipeThreshold={0.7}
>
{/* row content */}
</SwipeableListItem>Import
import { SwipeableListItem } from 'fluxo-ui';
import type { SwipeableListItemProps, SwipeableAction, SwipeableVariant } from 'fluxo-ui';Props
childrenreqReactNodeMain row content that is revealed/translated when the user swipes.
childrenreqReactNodeMain row content that is revealed/translated when the user swipes.
leftActionsSwipeableAction[]Actions revealed when swiping right. Each: { key?, label, icon?, color?, onTrigger?, fullSwipe?, background?, ariaLabel? }.
leftActionsSwipeableAction[]Actions revealed when swiping right. Each: { key?, label, icon?, color?, onTrigger?, fullSwipe?, background?, ariaLabel? }.
rightActionsSwipeableAction[]Actions revealed when swiping left.
rightActionsSwipeableAction[]Actions revealed when swiping left.
thresholdnumber"0.4"Fraction of the actions strip width that must be swiped to open. Range 0-1.
thresholdnumber"0.4"Fraction of the actions strip width that must be swiped to open. Range 0-1.
fullSwipeThresholdnumber"0.7"Fraction beyond which an action marked fullSwipe is auto-triggered without tapping.
fullSwipeThresholdnumber"0.7"Fraction beyond which an action marked fullSwipe is auto-triggered without tapping.
variant'inline' | 'card' | 'compact'"'inline'"Visual style. 'card' adds rounded corners and a border; 'compact' uses tighter padding.
variant'inline' | 'card' | 'compact'"'inline'"Visual style. 'card' adds rounded corners and a border; 'compact' uses tighter padding.
disabledboolean"false"Disable the swipe gesture.
disabledboolean"false"Disable the swipe gesture.
onSwipeOpen(side: 'left' | 'right') => voidCalled when the row settles open on one side.
onSwipeOpen(side: 'left' | 'right') => voidCalled when the row settles open on one side.
onSwipeClose() => voidCalled when the row returns to closed.
onSwipeClose() => voidCalled when the row returns to closed.
closeOnSelectboolean"true"Auto-close after an action is tapped.
closeOnSelectboolean"true"Auto-close after an action is tapped.
classNamestringAdditional CSS class for the wrapper.
classNamestringAdditional CSS class for the wrapper.
actionWidthnumber"80"Pixel width per revealed action button.
actionWidthnumber"80"Pixel width per revealed action button.
Features
Left & right actions
Reveal independent action strips on either side of the row.
Per-action colors
Use the shared status palette: primary, success, warning, danger, neutral.
Full-swipe trigger
Mark a primary action with fullSwipe to fire it automatically on a long swipe.
Three variants
Inline rows, rounded cards, or compact dense rows.
Axis-locked drag
Vertical scrolling stays untouched — the row only intercepts clear horizontal gestures.
Imperative handle
Use a ref to programmatically open/close from outside.