Bindings, Actions & Transitions
Connecting components to the DOM and to motion
Section titled “Connecting components to the DOM and to motion”Runes give you reactive state; this module covers the directives that connect that state to real DOM elements and to visual motion:
- Bindings (
bind:) create a two-way link between state and a DOM property — the input updates the state, and the state updates the input. - Actions (
use:) run imperative setup code on an element when it mounts — the escape hatch for third-party libraries, focus, tooltips, and click-outside. - Transitions & animations (
transition:,animate:) declaratively animate elements as they enter, leave, and reorder.
What this module covers
Section titled “What this module covers”| Lesson | What you’ll learn |
|---|---|
| Bindings | bind:value, bind:this, bind:group, and component bindings |
| Actions | The use: directive and the action lifecycle |
| Transitions & animations | transition:/in:/out: and animate:flip |
| Forms & inputs | Controlled inputs, validation, and submit handling |
flowchart TB state["reactive state (runes)"] --> bind["bind: two-way link to DOM props"] state --> action["use: imperative setup on an element"] state --> trans["transition: / animate: declarative motion"] bind --> dom["the DOM"] action --> dom trans --> dom