# <dismissible>

A list row you swipe away, as in a mail app, revealing a layer behind it as it moves.

Category: Layout. Also written `<swipe-row>`, `<swipeable>`.

```ham
<column style="gap-1 w-full">
    <swipe-row 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>
    </swipe-row>
    <dismissible 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>
    </dismissible>
</column>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/dismissible-light.webp), [dark](https://hypeapps.dev/img/tags/dismissible-dark.webp).

## 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.) |  |
| `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. | `true` |
| `duration` | Milliseconds for the fling-out. | `200` |
| `resize` | Milliseconds for the height collapse. | `300` |
| `threshold` | Fraction of the row's extent the drag must cross to dismiss. | `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.

## Guides and recipes that use it

- [Data and databases](https://hypeapps.dev/docs/guides/data.md)

## Related tags

- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<background>`](https://hypeapps.dev/docs/reference/background.md): The layer a swiped dismissible row reveals behind it, such as a red delete strip.
- [`<icon>`](https://hypeapps.dev/docs/reference/icon.md): A Material Symbols icon, with its style, weight, size and color set in its name.
- [`<row>`](https://hypeapps.dev/docs/reference/row.md): Lays children side by side in one line; flex= shares the free space and align/cross position them.
- [`<avatar>`](https://hypeapps.dev/docs/reference/avatar.md): A round avatar from a photo, initials or an icon, in any size and color.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<address>`](https://hypeapps.dev/docs/reference/address.md): Contact details as a block, in italic by default, as HTML's address element.
- [`<aside>`](https://hypeapps.dev/docs/reference/aside.md): A side note set apart from the main text, as HTML's aside element; it works like a block.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
