Error primitives for rendering assistant-ui runtime, thread, and message failures inside custom chat interfaces.
For examples and usage patterns, see Error.
Anatomy
import { ErrorPrimitive } from "@assistant-ui/react";
const ErrorDisplay = () => (
<ErrorPrimitive.Root>
<ErrorPrimitive.Message />
</ErrorPrimitive.Root>
);API Reference
Root
This primitive renders a <div> element unless asChild is set.
ErrorPrimitiveRootProps
- asChildboolean= false
Change the default rendered element for the one passed as a child, merging their props and behavior.
Read the Composition guide for more details.- render?ReactElement | undefined
Message
This primitive renders a <span> element unless asChild is set.
ErrorPrimitiveMessageProps
- asChildboolean= false
Change the default rendered element for the one passed as a child, merging their props and behavior.
Read the Composition guide for more details.- render?ReactElement | undefined