> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rixxui.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RUIRenderer

> Compile accumulated RUI source into inert previews and an authoritative committed React surface.

`RUIRenderer` is the primary structured response API. It accepts the accumulated
source string as `children`, validates it against a catalog, and renders only
trusted registered components.

```tsx theme={null}
import { RUIRenderer } from "@rixx-ui/react";
import "@rixx-ui/react/styles.css";

<RUIRenderer
  config={config}
  data={trustedData}
  streamStatus={status}
  retryKey={attempt}
  fallback={({ status }) => <p>Response {status}.</p>}
  onAction={handleActionRequest}
  onError={reportSafeDiagnostic}
>
  {accumulatedSource}
</RUIRenderer>;
```

## Source lifecycle

1. Complete physical statements are parsed as characters arrive.
2. Valid statements may form an inert provisional surface.
3. Invalid lines or nodes are quarantined with bounded diagnostics.
4. `complete` synthesizes and validates the trusted commit.
5. Only the committed surface enables interactions and custom components.

Use `streamStatus` with `streaming`, `complete`, `cancelled`, or `failed`.
`isStreaming` remains available as a simpler boolean, but `streamStatus` carries
the full terminal state. `retryKey` resets compilation for a new attempt;
replacing the source with a non-prefix value also resets it.

## Host inputs and events

`data`, `context`, and `draft` are read-only host inputs. Events are frozen
objects and can be observed through `onAction`, `onNavigate`, `onRender`,
`onError`, or the combined `onEvent`. `onStateChange` exposes source,
diagnostics, catalog, stream state, and the current snapshot for tools such as
[Devtools](/integrations/devtools).

For every prop, see the [`@rixx-ui/react` API](/reference/react).
