Examples menu

๐Ÿ‘‹ Greeter

Form inputs, multiple actions, and signal updates with Twig templates.

Multiple actions can share the same signal. Both "Greet Bob" and "Greet Alice" update the same greeting signal with different values.
Twig templates render the UI server-side. Signal values are interpolated into the template and pushed to the browser via SSE patches.
Zero JavaScript โ€” every button click fires a server round-trip via Datastar. The response patches only the changed DOM fragment, not the whole page.

Greeting: Hello...

โšก Signals

greeting string TAB Hello...

The displayed greeting message. Both actions write to this same signal.

๐ŸŽฏ Actions

greetBob

Sets the greeting signal to "Hello Bob!".

greetAlice

Sets the greeting signal to "Hello Alice!".

๐Ÿ‘ Views

greeter.html.twig

Buttons trigger server-side actions; the greeting text updates reactively via SSE patch.