Interface: OpenUiRendererRuntimeProps
Props for rendering raw OpenUI response text with parsing, runtime state, actions, and query execution.
Properties
initialQueryResults?
optionalinitialQueryResults?:Readonly<Record<string,unknown>>
Prefetched Query results keyed by Query assignment name (statement ID). Results render synchronously, then an optional toolProvider revalidates.
initialState?
optionalinitialState?:Record<string,unknown>
Initial persisted state. $-prefixed keys hydrate reactive bindings.
isStreaming?
optionalisStreaming?:boolean
Whether model generation is active. Partial output renders while Query execution, mutation registration, and built-in interactions wait. Set false only after successful completion, even if response is unchanged. On failure or cancellation, clear response instead of completing partial text.
Default Value
library
library:
Library
Component library from createOpenUiLibrary().
onAction?
optionalonAction?: (event:ActionEvent) =>void
Callback when a component triggers a host action.
Parameters
Returns
void
onError?
optionalonError?: (errors:OpenUIError[]) =>void
Structured parser/runtime/query errors for correction loops.
Parameters
Returns
void
onParseResult?
optionalonParseResult?: (result:ParseResult|null) =>void
Called whenever the raw parse result changes.
Parameters
Returns
void
onStateUpdate?
optionalonStateUpdate?: (state:Record<string,unknown>) =>void
Called whenever $variables or form state changes.
Parameters
Returns
void
queryLoader?
optionalqueryLoader?:ReactNode
Custom loading node shown while Query() calls are in flight.
response
response:
string|null
Full accumulated OpenUI Lang text, or null to clear the rendered output. Append model deltas before passing this prop; completed statements are cached by the renderer's incremental parser. Replacing text resets parsing. Clearing text does not reset form state; use a new key for a fresh session.
Example
toolProvider?
optionaltoolProvider?:ToolProviderInput
Tool provider for Query()/Mutation(): function map or MCP client.