Interactive examples
Show the pattern, not a framework maze.
Each example is a concrete RGX application. Start with the Visual tab, then switch to Trigger HTML or Handler to see how a thin browser can still drive a full interface.
The examples page highlights the projects already using RGX in production.
Structured data demo
JSON Formatter
Format, minify, and inspect JSON without leaving the page.
JSON formatter
Format and minify structured data
Keep the workflow local, readable, and fast enough for demos and utilities.
Ready
Trigger HTML
RGX trigger and selector map
The HTML tab shows the request trigger and the selectors RGX uses to update the page.
{{define "example-json"}}
<form
class="tool-shell tool-shell-accent"
id="json-shell"
action="/examples/json"
method="post"
data-gx-url="/fragments/examples/json"
data-gx-select="#json-shell@outerHTML->#json-shell@outerHTML"
>
<header class="tool-shell-head">
<div>
<p class="eyebrow">JSON formatter</p>
<h3>Format and minify structured data</h3>
<p>Keep the workflow local, readable, and fast enough for demos and utilities.</p>
</div>
<span class="tool-chip">RGX</span>
</header>
<label class="tool-field">
<span>JSON input</span>
<textarea name="json" data-json-input spellcheck="false">{"project":"RGX","status":"shipped","owner":"Christopher Cordine"}</textarea>
</label>
<div class="tool-actions">
<button type="submit" class="tool-button" name="mode" value="format">Format</button>
<button type="submit" class="tool-button" name="mode" value="minify">Minify</button>
<button type="button" class="tool-button tool-button-ghost" data-json-action="copy">Copy</button>
</div>
<div class="tool-output">
<div class="tool-status" data-example-status>Ready</div>
<pre class="json-output" id="json-output" data-json-output aria-live="polite"></pre>
</div>
</form>
{{end}}
Handler
Server response and headers
The handler tab shows the route code that returns the same UI with RGX headers and presets.
func (a *App) updateJSON(w http.ResponseWriter, r *http.Request) {
raw := strings.TrimSpace(r.FormValue("json"))
mode := strings.TrimSpace(r.FormValue("mode"))
output, err := formatJSONPayload(raw, mode)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
}
w.Header().Set("Recyclr-Use-Presets", "json")
w.Header().Set("Recyclr-Event", "updated")
renderTemplate(w, "examples/json", map[string]any{
"Input": raw,
"Output": output,
"Error": err,
})
}