Skip to content
Recyclr GX Fragment-first HTML for the app you already have.
Home Examples GitHub npm
Install Read docs

Documentation

Docs

Install, runtime behavior, fragment routes, redirects, presets, realtime, and forms.

Install

npm install recyclrjs

Mount once, use short selectors, and keep the server in charge of state.

Getting Started Install RGX, mount the browser runtime, and replace your first fragment. Runtime Model Understand how RGX reuses one browser instance, turns requests into fragments, and dispatches updates. Fragment Routes Serve full documents and partial shells from the same Go handlers. Selectors and Swaps Start with `#nav`, then layer in locations, targets, conditions, and multi-target swaps. Recommended Usage Keep state on the server, let templates own the defaults, and use preset bundles when selectors need to stay short. Forms and History Use RGX for forms, loading states, and browser history without losing server control. Redirects and Headers Use standard HTTP redirects and Location headers when the server needs to move the browser. Realtime Push WebSocket and SSE payloads through the same render path as ordinary HTML requests. Presets Load alternate swap rules from a preset map or an external JSON file.

Manual

Documentation that stays close to the runtime.

Install, runtime model, fragment routes, selectors, redirects, presets, realtime, and forms.

Getting Started Install RGX, mount the browser runtime, and replace your first fragment. Read the guide Runtime Model Understand how RGX reuses one browser instance, turns requests into fragments, and dispatches updates. Read the guide Fragment Routes Serve full documents and partial shells from the same Go handlers. Read the guide Selectors and Swaps Start with `#nav`, then layer in locations, targets, conditions, and multi-target swaps. Read the guide Recommended Usage Keep state on the server, let templates own the defaults, and use preset bundles when selectors need to stay short. Read the guide Forms and History Use RGX for forms, loading states, and browser history without losing server control. Read the guide Redirects and Headers Use standard HTTP redirects and Location headers when the server needs to move the browser. Read the guide Realtime Push WebSocket and SSE payloads through the same render path as ordinary HTML requests. Read the guide Presets Load alternate swap rules from a preset map or an external JSON file. Read the guide

Open source runtime

RGX

One request. Many updates.

Install Read docs Examples
Product Home Install Examples GitHub
Reference Documentation Fragment routes Redirects and headers Realtime Recommended usage
Connect cordine.site npm package GitHub
Open source. Production-ready. Self-hostable. © 2026 Christopher Cordine rgx.cordine.site