⚠️ Alpha · testnets only. ChainRender is in active alpha and deployed on testnets only — Ethereum Sepolia, the Robinhood Chain Testnet, and the Circle Arc Testnet — not on any mainnet. Contracts, addresses, and APIs may change. Do not use with real funds or production assets.
Guides

Guide: Theme Without Redeploying

Goal: change your app's colors, spacing, or fonts — at zero gas, no redeploy.

Presentation is a render-time parameter. Pass a presentation context when you render:

import { presentationContext } from "@chainrender/client";
import { renderComponentWithContext } from "@chainrender/client/runtime";

const ctx = presentationContext({ themeId: "0x<theme>", chartW: 960, chartH: 520 }); // or tokens / overrideTokens
const html = await renderComponentWithContext({ rpc, router }, hash, ctx);          // RenderRouter.renderHashWithContext

An empty context (emptyContext()) renders byte-for-byte like renderComponent({ rpc, router }, hash). The context is skin only: it never changes the component's hash, behaviour or grade.

For whole-page spacing/font changes, override the design tokens — the component CSS is token-driven, so scaling a spacing token re-flows the entire page. This happens in the browser (or via the render context) at zero gas and zero chain calls during iteration; you seed a chosen theme on-chain only once, when it's final.

To commit a theme as your app's default, seed its CSS to the on-chain store and point your app at the new theme id. See Concepts → Theming.