- Prop
attachments- Type
readonly AssistantAttachment[] | undefined- Default
- —
- Requirement
- optional
Docs Components Assistant
ComposerAttachments
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 { ComposerAttachments } from "@grassroot/ui-react/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; export default function ComposerAttachmentsDemo() { return <ComposerAttachments attachments={assistantDemoAttachments} />;}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">import { ComposerAttachments } from "@grassroot/ui-vue/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures";</script> <template> <ComposerAttachments :attachments="assistantDemoAttachments" /></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import "./ensure-compiler";import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootComposerAttachments } from "@grassroot/ui-angular/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; @Component({ selector: "app-composer-attachments-demo", standalone: true, imports: [GrassrootComposerAttachments], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-composer-attachments [attachments]="attachments" />`,})export class ComposerAttachmentsDemoComponent { protected readonly attachments = assistantDemoAttachments;} export default ComposerAttachmentsDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> import { ComposerAttachments } from "@grassroot/ui-svelte/assistant"; import { assistantDemoAttachments } from "@grassroot/demo-fixtures";</script> <ComposerAttachments attachments={assistantDemoAttachments} />- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { ComposerAttachments } from "@grassroot/ui-solid/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; export default function ComposerAttachmentsDemo() { return <ComposerAttachments attachments={assistantDemoAttachments} />;}Installation
API Reference
Import
import { ComposerAttachments } 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 { ComposerAttachments } 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 { GrassrootComposerAttachments } 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 { ComposerAttachments } 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 |
Content regions
children
Import
import { ComposerAttachments } 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.