Server-DrivenReactivity
Watch how irgo + Datastar creates seamless, real-time interactions.
All updates flow from Go handlers via SSE streams.
Live Counter
SSE ResponseClick the button to trigger a Datastar action. The server responds with an SSE stream that morphs the DOM.
func Increment(ctx *router.Context) error { count++ return ctx.SSE().PatchTempl( templates.Counter(count), )}templ Counter(count int) { <div id="counter-value"> <span>{ strconv.Itoa(count) }</span> </div>}DOM Morphing
Datastar uses Idiomorph to intelligently update the DOM. Elements morph smoothly instead of being replaced, preserving scroll position, focus, and CSS animations.
Reactive Signals
Datastar signals provide client-side reactivity that syncs with server state. Two-way binding keeps your UI and server in perfect harmony.
<div data-signals="{name: '', greeting: ''}"> <input data-bind:name /> <button data-on:click="@post('/greet')"> Say Hello </button> <p data-text="$greeting"></p></div>Real-Time Updates
Server push via SSE hub. Perfect for live dashboards, notifications, and collaborative features.
Live Dashboard
Stream metrics and stats to connected clients
Notifications
Push alerts instantly to specific users
Collaborative
Real-time sync across multiple sessions
Chat
Build chat rooms with just Go and HTML
// Broadcast to all clients in a roomhub.BroadcastToRoom("dashboard", datastar.PatchElements(html), datastar.PatchSignals(map[string]any{ "lastUpdate": time.Now().Format(time.RFC3339), }),)Ready to Build?
Create your first irgo app in under a minute. Full cross-platform support included.
