Push a row sideways. Past about a third of its width, or fast enough that the intent is obvious, it leaves; short of both, it springs back. The gauge under the list shows how close the current swipe is to committing. Every row also has a real Remove button, because a gesture is an accelerator for something that must already be possible without one.
const THRESHOLD = 0.32; /* of the row's width */
const ESCAPE = 0.45; /* px per ms */
const LOCK = 10; /* px before the axis is decided */
/* the axis is decided once and then never again */
if (!axis && Math.hypot(dx, dy) > LOCK)
axis = Math.abs(dx) > Math.abs(dy) ? "x" : "y";
if (axis !== "x") return; /* it is a scroll. Let it be one. */
/* on release */
const far = Math.abs(dx) / width > THRESHOLD;
const fast = Math.abs(vx) > ESCAPE;
(far || fast) ? dismiss(Math.sign(dx)) : springBack();
/* the collapse, with no measuring: 1fr to 0fr */
.slot{ display:grid; grid-template-rows:1fr; transition:grid-template-rows .3s }
.slot.gone{ grid-template-rows:0fr }touch-action: pan-y is what makes the
lock possible at all: the browser keeps the vertical axis for scrolling and gives us the
horizontal one, so a list can be both scrollable and swipeable with no compromise.