1. Reference
  2. Layout

<background>

The layer a swiped dismissible row reveals behind it, such as a red delete strip.

Layout
background.ham
<dismissible direction="left">
    <background style="bg-red flex-row justify-end items-center px-16">
        <icon name="delete white"/>
    </background>
    <row style="p-16 bg-white dark:bg-gray-900 gap-12 items-center">
        <icon name="mail"/>
        <text>Swipe left to delete this message</text>
    </row>
</dismissible>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
autoscroll-delay Autoscroll delay in seconds
number
0.0
autoscroll-loop Whether autoscroll loops
boolean
false
autoscroll-restart Autoscroll restart delay in seconds, or 'false' to disable
string
autoscroll-speed Autoscroll speed in pixels per second
number
autoscroll-target page: scroll the screen; self: scroll inside this box (give it a height). parent is accepted as self.
page, self
page
side Edge this layer belongs to: left/start shows while swiping right, right/end while swiping left. Default both.
left, start, right, end
swipe The same, named by the swipe that reveals it: swipe="left" = side="right".
left, right

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

This page is also Markdown, and all of HAM is in llms.txt.