<tap-swipeout>
Swipe a list item horizontally to reveal actions, like iOS. Put actions in the start or end slot.
With enable-long-drag, dragging far triggers the outermost action and fires long-drag,
an element in the danger slot is placed at the end and expands to full width when long dragged.
Example
Loading...
<tap-swipeout style=${"width: 100%;"} .enableLongDrag=${true}> <button slot='start'>Pin</button><button slot='end'>More</button><button slot='danger' style='background: red; color: white'>Delete</button><div style='padding: 1em'>Swipe left or right</div> </tap-swipeout>
API
Shadow DOM; Extends GemElement
Static Properties
| Property | Type |
|---|---|
activeSwipeout |
TapSwipeoutElement | undefined |
Instance Properties
| Property(Attribute) | Reactive | Type |
|---|---|---|
disabled(disabled) |
Yes | boolean |
enableLongDrag(enable-long-drag) |
Yes | boolean |
threshold(threshold) |
Yes | number |
change |
Emitter<SwipeoutSide | null> |
|
longDrag |
Emitter<SwipeoutSide> |
|
open |
(side?: SwipeoutSide) => Promise<void> | undefined |
|
close |
() => Promise<void> |
|
toggle |
(side?: SwipeoutSide) => Promise<void> | undefined |
|
dismiss |
() => Promise<void> |
Other
| Type | Value |
|---|---|
| Event | change, long-drag |
| Slot | start, end, content, danger |
| CSS State | opened |
