| attr:name="expression" |
Sets an element’s attribute value based on an expression. |
| attr="{attributeName: expression}" |
Sets one or more attribute values using a set of key-value pairs that map to the attribute name and expression. |
| bind:name |
Creates a new signal and enables two-way binding between it and the element. |
| bind="signalName" |
Creates a new signal and enables two-way binding between it and the element. |
| class:name="expression" |
Adds or removes a class from an element based on an expression. |
| class="{className: expression}" |
Adds or removes one or more classes from an element using a set of key-value pairs that map to the class name and expression. |
| computed:name="expression" |
Creates a signal that is computed based on an expression. |
| computed="{signalName: expression}" |
Creates one or more signals that are computed based on a set of key-value pairs that map to the signal name and expression. |
| effect="expression" |
Executes an expression on page load and whenever any signals in the expression change. |
| ignore |
Ignores an element and its descendants from being processed. |
| ignore-morph |
Ignores an element when patching an element using the `morph` mode. |
| indicator:name |
Creates a signal to track in-flight backend requests. |
| indicator="signalName" |
Creates a signal to track in-flight backend requests. |
| init="expression" |
Runs an expression whenever the attribute is initialised. |
| json-signals="expression" |
Sets the text content of an element to a reactive JSON stringified version of signals. |
| on-intersect="expression" |
Runs an expression on intersection with the viewport. |
| on-interval="expression" |
Runs an expression at a regular interval. |
| on-signal-patch-filter="expression" |
Filters which signals to watch when using the `data-on-signal-patch` attribute. |
| on-signal-patch="expression" |
Runs an expression whenever one or more signals are patched. |
| on:click="expression" |
Runs an expression whenever the element is clicked. |
| on:keydown="expression" |
Runs an expression whenever a key is pressed. |
| on:name="expression" |
Runs an expression whenever an event is triggered on an element. |
| preserve-attr="" |
Preserves the value of an attribute when patching elements using the `morph` mode. |
| ref:name |
Creates a signal whose value references an element. |
| ref="signalName" |
Creates a signal whose value references an element. |
| show="expression" |
Shows or hides an element based on whether an expression evaluates to `true` or `false`. |
| signals:name="expression" |
Merges a signal into the existing signals. |
| signals="{signalName: expression}" |
Merges one or more signals into the existing signals using a set of key-value pairs that map to the signal name and expression. |
| style:name="expression" |
Adds or removes an inline CSS style from an element based on an expression. |
| style="{styleName: expression}" |
Adds or removes one or more inline CSS styles from an element using a set of key-value pairs that map to the style name and expression. |
| text="expression" |
Sets the text content of an element to the evaluated expression. |