# Generative UI Rendering
URL: /docs/api-reference/generative-ui/rendering

Render a generative UI spec into React. The renderer resolves spec nodes against your component registry, and the error thrown when a component cannot be resolved.

- as

  h2

API Reference

- as

  h3

GenerativeUIRender

Internal renderer. Resolves a

- href

  /docs/api-reference/generative-ui/spec#generativeuispec

GenerativeUISpec

against the consumer allowlist. Used by `MessagePrimitive.GenerativeUI` and by `MessagePrimitive.Parts` when handling a `generative-ui` part.

`GenerativeUIRender props`

- `spec` `: GenerativeUISpec`

  The JSON spec to render.

  - `root` `: GenerativeUINode | readonly GenerativeUINode[]`

    Root node(s) to render.

- `components` `: GenerativeUIComponentRegistry`

  The component allowlist.

- `Fallback` `?: ComponentType<{ component: string; props?: unknown }>`

  Optional fallback for unknown component names.

* as

  h3

GenerativeUIRenderError

Thrown when a generative-ui spec references a component name that is not present in the consumer-provided allowlist. The allowlist is the security boundary in the same-realm rendering path — there is no fallback by default. Pass `Fallback` to opt into a soft-fail UX.

`GenerativeUIRenderError`

- `constructor` ``?: (componentName: string, message: string = `Component "${componentName}" is not in the generative-ui allowlist.`) => GenerativeUIRenderError``
- `componentName` `?: string`