25th July 2026 at 1:53am
The actions attribute holds one or more ActionWidgets that run when the button is clicked. This is the preferred way to give a button its behaviour, because the whole behaviour sits in one place instead of being spread over several attributes.
A button runs actions last, after to, message, popup and set. ButtonWidget lists the full order. A single <$button to="HelloThere">Click Me</$button> still needs no action string.
The procedure below runs two actions in a single click:
- one sets a message
- the other bumps a counter
Click Greet a few times to watch both update.
| title | Output |
Message: (clicked 0 times)