<snackbar>
A short message bar pinned to the bottom of the screen, with an optional action button.
<column style="w-full gap-12">
<text>Inbox</text>
<snackbar message="Message archived"
action-label="Undo"
duration="10"/>
</column>
Attributes
| Name | What it does | Default |
|---|---|---|
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 |
messagealso text |
Snackbar message string |
Commands
| Name | What it does |
|---|---|
dismiss |
Close it. |
show |
Open it. |
Events
| Name | What 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.