Skip to content
thepian edited this page Sep 16, 2014 · 2 revisions

Sometimes you just want to add a button that will do something when tapped.

role = button

Default actions

If no action attribute is defined on or above the button the name will refer to the default actions.

<button name="close">&times;</button>

This button when placed in a dialog header (outside an action context) will allow you to close the dialog.

<button name="state.hidden::toggle">Hide this</button>
<button name="state.expanded::toggle">Expand/collapse this</button>

You can manipulate the state of the button by combining a reference with an action. Available actions are toggle, blank, true, false and =... If you start with an equal sign the remainder is the value it is set to. It will be coerced to bool/number or string if not. Use quotes to force a string.

<button name="stateful(1)::state.hidden::toggle">Hide this</button>
<button name="stateful(1)::state.expanded::toggle">Expand/collapse this</button>

You can also manipulate the state of a parent element. Use larger number to go up the chain. Zero is the button. Alternately you can specify a named resolver.

Clone this wiki locally