Skip to main content
These recipes assume Reactivity is enabled. For full binding syntax, see the reference pages.

Counter or toggle

Replace imperative listener wiring with state + events:
When to reach for Alpine instead: complex component trees, third-party Alpine plugins, or existing x-data snippets you do not want to rewrite.

Form with live validation

Two-way value / checked bindings keep inputs and summary in sync:
See Bindings reference for select, textarea, and radio groups.

Conditional sections

Build-time if renders once; reactive if / else-if / else re-evaluates when state changes:
For value matching (status enums), use structural switch.

Dynamic lists

Keyed for preserves row DOM when items reorder or insert:
Pair with the View Transitions API in a client script for animated list changes.

State in a child component

When a parent and child both edit the same value, use reactive props:
Props without Aero.bindable() are readonly in the child.

Runtime-inserted markup

Hypermedia swaps and manual innerHTML need process so bindings attach to new nodes. When hypermedia and reactivity are both on, processing after swaps is automatic.

Choosing Aero reactivity vs Alpine vs HTMX

All three can coexist in one project. Aero passes x-* and hx-* through unchanged.