- Prop
file- Type
AssistantAttachment- Default
- —
- Requirement
- required
Docs Components Assistant
File
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 { File } from "@grassroot/ui-react/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; export default function FileDemo() { return <File file={assistantDemoAttachments[0]} />;}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">import { File } from "@grassroot/ui-vue/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures";</script> <template> <File :file="assistantDemoAttachments[0]" /></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import "./ensure-compiler";import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootAssistantFile } from "@grassroot/ui-angular/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; @Component({ selector: "app-file-demo", standalone: true, imports: [GrassrootAssistantFile], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-assistant-file [file]="file" />`,})export class FileDemoComponent { protected readonly file = assistantDemoAttachments[0];} export default FileDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> import { File } from "@grassroot/ui-svelte/assistant"; import { assistantDemoAttachments } from "@grassroot/demo-fixtures";</script> <File file={assistantDemoAttachments[0]} />- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { File } from "@grassroot/ui-solid/assistant";import { assistantDemoAttachments } from "@grassroot/demo-fixtures"; export default function FileDemo() { return <File file={assistantDemoAttachments[0]} />;}Installation
API Reference
Import
import { File } from "@grassroot/ui-react/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
fileAssistantAttachment—
required
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { File } from "@grassroot/ui-vue/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
fileAssistantAttachment—
required
- Prop
file- Type
AssistantAttachment- Default
- —
- Requirement
- required
Import
import "./ensure-compiler";
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootAssistantFile } from "@grassroot/ui-angular/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
fileAssistantAttachment—
required
- Prop
file- Type
AssistantAttachment- Default
- —
- Requirement
- required
Import
import { File } from "@grassroot/ui-svelte/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
fileAssistantAttachment—
required
classstring—
optional
stylestring—
optional
- Prop
file- Type
AssistantAttachment- Default
- —
- Requirement
- required
- Prop
class- Type
string- Default
- —
- Requirement
- optional
- Prop
style- Type
string- Default
- —
- Requirement
- optional
Content regions
children
Import
import { File } from "@grassroot/ui-solid/assistant";
import { assistantDemoAttachments } from "@grassroot/demo-fixtures";
Props
Prop
Type
Default
Requirement
fileAssistantAttachment—
required
- Prop
file- Type
AssistantAttachment- Default
- —
- Requirement
- required
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.