import { AttachmentPrimitiveRemoveProps, AttachmentPrimitiveRootProps } from "@/generated/typeDocs";
import { AttachmentPrimitive as AttachmentPrimitiveDocs } from "@/generated/primitiveDocs";
{/* AUTO-GENERATED PAGE by scripts/generate-api-reference.mts /}
{/ Do not edit manually. */}
For examples and usage patterns, see Attachment.
{/* api-manual */}
Anatomy#
import { AttachmentPrimitive } from "@assistant-ui/react";
const MyMessageAttachment = () => (
<AttachmentPrimitive.Root>
<AttachmentPrimitive.unstable_Thumb />
<AttachmentPrimitive.Name />
</AttachmentPrimitive.Root>
);
const MyComposerAttachment = () => (
<AttachmentPrimitive.Root>
<AttachmentPrimitive.unstable_Thumb />
<AttachmentPrimitive.Name />
<AttachmentPrimitive.Remove />
</AttachmentPrimitive.Root>
);
{/* api-manual */}
{/* api-reference /}
{/ AUTO-GENERATED by scripts/generate-api-reference.mts /}
{/ Do not edit this block manually. */}
API Reference#
Root#
{AttachmentPrimitiveDocs.Root?.deprecated && (
Deprecated. {AttachmentPrimitiveDocs.Root.deprecated}
)}
{AttachmentPrimitiveDocs.Root?.description}
{AttachmentPrimitiveDocs.Root?.element && (
This primitive renders a {`<${AttachmentPrimitiveDocs.Root?.element}>`} element unless asChild is set.
<ParametersTable {...AttachmentPrimitiveRootProps} />
Name#
{AttachmentPrimitiveDocs.Name?.deprecated && (
Deprecated. {AttachmentPrimitiveDocs.Name.deprecated}
)}
{AttachmentPrimitiveDocs.Name?.description}
{AttachmentPrimitiveDocs.Name?.element && (
This primitive renders a {`<${AttachmentPrimitiveDocs.Name?.element}>`} element unless asChild is set.
{AttachmentPrimitiveDocs.Name?.props && (
)}
Remove#
{AttachmentPrimitiveDocs.Remove?.deprecated && (
Deprecated. {AttachmentPrimitiveDocs.Remove.deprecated}
)}
{AttachmentPrimitiveDocs.Remove?.description}
{AttachmentPrimitiveDocs.Remove?.element && (
This primitive renders a {`<${AttachmentPrimitiveDocs.Remove?.element}>`} element unless asChild is set.
<ParametersTable {...AttachmentPrimitiveRemoveProps} />
{/* api-reference */}