- Prop
attachments- Type
readonly AssistantAttachment[] | undefined- Default
- —
- Requirement
- optional
Docs Components Assistant
UserMessageAttachments
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import { UserMessageAttachments } from "@grassroot/ui-react/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; export default function UserMessageAttachmentsDemo() { return <UserMessageAttachments attachments={assistantDemoAttachments} />;}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">import { UserMessageAttachments } from "@grassroot/ui-vue/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures";</script> <template> <UserMessageAttachments :attachments="assistantDemoAttachments" /></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import "./ensure-compiler";import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootUserMessageAttachments } from "@grassroot/ui-angular/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; @Component({ selector: "app-user-message-attachments-demo", standalone: true, imports: [GrassrootUserMessageAttachments], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-user-message-attachments [attachments]="attachments" />`,})export class UserMessageAttachmentsDemoComponent { protected readonly attachments = assistantDemoAttachments;} export default UserMessageAttachmentsDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> import { UserMessageAttachments } from "@grassroot/ui-svelte/assistant"; import { assistantDemoAttachments } from "@grassroot/demo-fixtures";</script> <UserMessageAttachments attachments={assistantDemoAttachments} />- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { UserMessageAttachments } from "@grassroot/ui-solid/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; export default function UserMessageAttachmentsDemo() { return <UserMessageAttachments attachments={assistantDemoAttachments} />;}Installation
API Reference
Import
import { UserMessageAttachments } from "@grassroot/ui-react/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
attachmentsreadonly AssistantAttachment[] | undefined—
optional
onRemove((attachment: AssistantAttachment) => void) | undefined—
optional
- Prop
onRemove- Type
((attachment: AssistantAttachment) => void) | undefined- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onRemove | ((attachment: AssistantAttachment) => void) | undefined |
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { UserMessageAttachments } from "@grassroot/ui-vue/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
attachmentsAssistantAttachment[]() => []optional
- Prop
attachments- Type
AssistantAttachment[]- Default
() => []- Requirement
- optional
Events
| Event | Payload |
|---|---|
remove | (AssistantAttachment) => void |
Import
import "./ensure-compiler";
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootUserMessageAttachments } from "@grassroot/ui-angular/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
attachmentsreadonly AssistantAttachment[][]optional
- Prop
attachments- Type
readonly AssistantAttachment[]- Default
[]- Requirement
- optional
Events
| Event | Payload |
|---|---|
remove | AssistantAttachment |
Import
import { UserMessageAttachments } from "@grassroot/ui-svelte/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
attachmentsreadonly AssistantAttachment[]—
optional
onRemove(attachment: AssistantAttachment) => void—
optional
classstring—
optional
stylestring—
optional
- Prop
attachments- Type
readonly AssistantAttachment[]- Default
- —
- Requirement
- optional
- Prop
onRemove- Type
(attachment: AssistantAttachment) => void- Default
- —
- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
- Prop
style- Type
string- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onRemove | (attachment: AssistantAttachment) => void |
Import
import { UserMessageAttachments } from "@grassroot/ui-solid/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
attachmentsreadonly AssistantAttachment[]—
optional
onRemove(attachment: AssistantAttachment) => void—
optional
- Prop
attachments- Type
readonly AssistantAttachment[]- Default
- —
- Requirement
- optional
- Prop
onRemove- Type
(attachment: AssistantAttachment) => void- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onRemove | (attachment: AssistantAttachment) => void |
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.