1. Reference
  2. Overlays

<snackbar>

A short message bar pinned to the bottom of the screen, with an optional action button.

Overlays
snackbar.ham
<column style="w-full gap-12">
    <text>Inbox</text>
    <snackbar message="Message archived"
              action-label="Undo"
              duration="10"/>
</column>
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
behavior Floating above the bottom, or fixed to it.
floating, fixed
floating
close-icon Show a close icon.
boolean
false
color Background color.
color
duration How long it shows: seconds (3), or 3s / 3000ms. A bare number over 60 is read as milliseconds.
string
4
message
also text
Snackbar message
string

Commands

NameWhat it does
dismiss Close it.
show Open it.

Events

NameWhat it does
action-label Action button label

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.

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