SwipeRow
moleculesList row that reveals a leading or trailing action on a horizontal swipe and fires it past a threshold, with keyboard buttons for the same actions.
Inbox
leadingAction archives on a rightward swipe, trailingAction deletes on a leftward one; past 35% of the width the action fires on release. Tab into a row for the same actions as buttons.
Jun Tanaka 07:42
worker-02 paged twice overnight CPU sat at 87% from 02:10 until the autoscaler kicked in.Billing 06:15
Your October invoice is ready Total due: €412.30, payable by 5 November.Lena Fischer Mon
Onboarding flow, round two I pushed the new illustrations to the shared board.GitHub Sun
[tsumikit] PR #81 merged feat: demo framework with glob registrySwipe a row with touch, pen or a mouse drag.
Tones, one side and custom panes
tone colours the revealed pane; omit a side to lock that direction; leading/trailing snippets get (action, armed) to change the pane once it will fire.
Swipe left: tone="accent"
Swipe left: tone="info"
Swipe left: tone="warn"
Swipe left: tone="neutral"
Swipe right: custom leading pane
States
disabled ignores the gesture and disables the hidden buttons; threshold sets the fraction of the width that arms the action; a row with no action is plain content.
Billing receipt locked
threshold 0.15: a short flick deletes
threshold 0.7: drag most of the way
A long notification body wraps inside the row while the swipe still reveals the pane behind it:
deployment of media-transcode to eu-west-1 finished with two warnings about deprecated codecs.
No actions: not swipeable
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children required | Snippet | — | |
leadingAction | SwipeAction | — | Revealed on a rightward swipe. |
trailingAction | SwipeAction | — | Revealed on a leftward swipe. |
leading | Snippet<[SwipeAction, boolean]> | — | Custom pane content; defaults to the action's icon and label. |
trailing | Snippet<[SwipeAction, boolean]> | — | |
threshold | number | 0.35 | Fraction of the row width the content must travel to fire. |
disabled | boolean | false | |
sound | boolean | true | Play UI sounds when enabled globally; false silences this instance. |
class | string | '' | |
style | string | — |