Next.js sample lab
Client, server, static, and incremental rendering of the same published widget.
DevelopersReact
React SDK
React is the RuleCMS reference SDK. Register custom libraries in the composer, server-render published widgets, preview Development drafts live, and pass host-app handlers into a single button.
Add @rulecms/widget-react and render a published widget.
Other official SDKs render the default RuleCMS cards. React can also bring your own system into the CMS.
Marketers still compose visually. Developers still get JSON, environment tokens, and a published key. The difference is how far the host app can go: React is where RuleCMS already acts as a design-system CMS, not only a card renderer.
fetchRuleCMSWidget plus mode="pre-fetched", or skip widget JavaScript entirely with RuleCMSWidgetServer on React Server Components.dev. token — no publish step. See development integration.Development, Staging, and Production each have their own keys.
Staging and production use a plain token plus a published key shaped like environmentId---widget-…. Development uses a dev. token and a draft widget key so the composer can stream the current draft into your app. Keep tokens in server-only environment variables whenever you fetch on the server — never NEXT_PUBLIC_* for a production token.
Full walkthrough: projects, environments, and tokens.
Two server APIs. Pick the one that matches your host.
Prefetch on the server, then hydrate in the browser. This works on Next.js App Router, Pages Router, Remix / React Router, and any React SSR host where you own the fetch:
On React Server Components, RuleCMSWidgetServer fetches and renders on the server. No widget JavaScript ships to the browser. If the CMS is down, the component logs and shows errorFallback — a content outage does not take your page with it.
This is the React-only depth other SDKs do not document.
The default cards cover a long customer journey on their own: heroes, FAQs, media, and calls to action. When your brand already lives in a React design system, register that library on the team. Editors drag your components. Published widgets render those same components in the host app, including SSR.
That is why React is first-class. Angular, Vue, Svelte, Flutter, and React Native still get official SDKs and the default card set — enough to buy, compose, publish, and ship. When you need the composer to speak your component library, React is the path that is already built.
Read the component libraries guide. For a live customer using a custom React library, see the ATL Fluid Art case study.
Address a column by the id the composer shows you.
A published widget should not own your checkout drawer or your router. Pass an onClick — or any extra prop — to one instance. A bare id matches every copy of a repeated collection. A / path of enclosing collection columns targets one embedding. Longest match wins. In development, a key that addresses no column prints once so typos show up while you build.
Install from the public registry. These are the supported SDK surfaces — not GitHub source repos.
Public teaching projects that show the integration pattern. Copy the wiring, not the app architecture — they are not production starters.
Client, server, static, and incremental rendering of the same published widget.
A client-rendered React lab for the basic embed path.
Loaders and rendering modes with @rulecms/widget-react.
Need the product docs for tokens, widgets, or the headless API? Start at Getting started, then environments and tokens and the API reference.
Same published widgets and environment tokens. Pick the guide for the stack you ship.
Dive deeper into what makes RuleCMS different.
Unlimited orgs, teams, and members — no per-seat fees
162 permissions, 70 roles, environment-aware access
Version history, visual diff, one-click revert
Create once, embed everywhere
SDKs for React, Angular, Vue, Svelte, HTML, Flutter, and React Native
Server rendering, edge caching, responsive media
Create a project, provision three environments, and copy a scoped API token.