Primitives
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.
ErrorPrimitiveRootPropsasChild: boolean= falseChange 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
Message
This primitive renders a <span> element unless asChild is set.
ErrorPrimitiveMessagePropsasChild: boolean= falseChange 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