<timer>
A timer that counts down to zero in a format you choose and can act when it gets there.
Aliases
Reset to canonicalThis tag has more than one name. Every spelling is the same tag, so write whichever feels natural. Pick one and every example on this page uses it.
<column style="items-center gap-8">
<text style="muted">Next question in</text>
<timer seconds="90"
format="mm:ss"/>
</column>
Attributes
| Name | What it does | Default |
|---|---|---|
format |
Display format hh:mm:ss, mm:ss, ss |
mm:ss |
seconds |
Total seconds to count down number |
60 |
Events
| Name | What it does |
|---|---|
on-done |
Statements run once when it reaches 0 (same as action-done / @on.done). Not while hidden by @show: hidden, it waits at its full time and starts over when shown; removed before 0, it never fires; mounted again (@@show, a new key), it counts from the top. |
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.