<swipeable>
A list row you swipe away, as in a mail app, revealing a layer behind it as it moves.
Aliases
Reset to canonicalThis tag has more than one name. Every spelling is the same tag, so write whichever feels natural. Pick one and every example on this page uses it.
<column style="gap-1 w-full">
<swipeable action-dismissleft="$archived = 1">
<background side="right"
style="bg-red flex-row justify-end items-center px-16">
<icon name="delete white"/>
</background>
<row style="p-16 gap-12 items-center bg-gray-100 dark:bg-gray-800">
<avatar text="MC"
size="36"/>
<text>Maya: Dinner on Friday?</text>
</row>
</swipeable>
<swipeable direction="left">
<background style="bg-red flex-row justify-end items-center px-16">
<icon name="delete white"/>
</background>
<row style="p-16 gap-12 items-center bg-gray-100 dark:bg-gray-800">
<avatar text="JR"
size="36"
color="teal"/>
<text>Jon: Tickets are booked</text>
</row>
</swipeable>
</column>
Attributes
| Name | What it does | Default |
|---|---|---|
confirm |
Condition (same grammar as @show) checked when the threshold is crossed; false snaps the row back. (This tag's own meaning: elsewhere confirm= is the confirm dialog.) expression |
|
direction |
Allowed swipe directions; a swipe in a disallowed direction does nothing. horizontal, left, right, vertical, up, down, none |
horizontal |
dismiss |
false = reveal-only: crossing the threshold fires reveal and the row snaps back. boolean |
true |
duration |
Milliseconds for the fling-out. number |
200 |
resize |
Milliseconds for the height collapse. number |
300 |
threshold |
Fraction of the row's extent the drag must cross to dismiss. number |
0.4 |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.