- Prop
accept- Type
string | undefined- Default
- —
- Requirement
- optional
Docs Components Assistant
ComposerAddAttachment
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 { ComposerAddAttachment } from "@grassroot/ui-react/assistant"; export default function ComposerAddAttachmentDemo() { return <ComposerAddAttachment accept="image/*,application/pdf" multiple={true}>Add attachment</ComposerAddAttachment>;}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">import { ComposerAddAttachment } from "@grassroot/ui-vue/assistant";</script> <template> <ComposerAddAttachment accept="image/*,application/pdf" :multiple="true">Add attachment</ComposerAddAttachment></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import "./ensure-compiler";import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootComposerAddAttachment } from "@grassroot/ui-angular/assistant"; @Component({ selector: "app-composer-add-attachment-demo", standalone: true, imports: [GrassrootComposerAddAttachment], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-composer-add-attachment accept="image/*,application/pdf" [multiple]="multiple">Add attachment</grassroot-composer-add-attachment>`,})export class ComposerAddAttachmentDemoComponent { protected readonly multiple = true;} export default ComposerAddAttachmentDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> import { ComposerAddAttachment } from "@grassroot/ui-svelte/assistant"; </script> <ComposerAddAttachment accept="image/*,application/pdf" multiple={true}>Add attachment</ComposerAddAttachment>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { ComposerAddAttachment } from "@grassroot/ui-solid/assistant"; export default function ComposerAddAttachmentDemo() { return <ComposerAddAttachment accept="image/*,application/pdf" multiple={true}>Add attachment</ComposerAddAttachment>;}Installation
API Reference
Import
import { ComposerAddAttachment } from "@grassroot/ui-react/assistant";
Props
Prop
Type
Default
Requirement
acceptstring | undefined—
optional
multipleboolean | undefined—
optional
onAdd((files: File[]) => void) | undefined—
optional
- Prop
multiple- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Prop
onAdd- Type
((files: File[]) => void) | undefined- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onAdd | ((files: File[]) => void) | undefined |
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { ComposerAddAttachment } from "@grassroot/ui-vue/assistant";
Props
Prop
Type
Default
Requirement
acceptstring—
optional
multiplebooleantrueoptional
- Prop
accept- Type
string- Default
- —
- Requirement
- optional
- Prop
multiple- Type
boolean- Default
true- Requirement
- optional
Events
| Event | Payload |
|---|---|
add | (File[]) => void |
Content regions
default
Import
import "./ensure-compiler";
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootComposerAddAttachment } from "@grassroot/ui-angular/assistant";
Props
Prop
Type
Default
Requirement
acceptstring—
optional
multiplebooleantrueoptional
- Prop
accept- Type
string- Default
- —
- Requirement
- optional
- Prop
multiple- Type
boolean- Default
true- Requirement
- optional
Events
| Event | Payload |
|---|---|
add | File[] |
Content regions
default
Import
import { ComposerAddAttachment } from "@grassroot/ui-svelte/assistant";
Props
Prop
Type
Default
Requirement
acceptstring—
optional
multiplebooleantrueoptional
onAdd(files: File[]) => void—
optional
classstring—
optional
stylestring—
optional
- Prop
accept- Type
string- Default
- —
- Requirement
- optional
- Prop
multiple- Type
boolean- Default
true- Requirement
- optional
- Prop
onAdd- Type
(files: File[]) => void- Default
- —
- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
- Prop
style- Type
string- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onAdd | (files: File[]) => void |
Content regions
children
Import
import { ComposerAddAttachment } from "@grassroot/ui-solid/assistant";
Props
Prop
Type
Default
Requirement
acceptstring—
optional
multipleboolean—
optional
onAdd(files: File[]) => void—
optional
- Prop
accept- Type
string- Default
- —
- Requirement
- optional
- Prop
multiple- Type
boolean- Default
- —
- Requirement
- optional
- Prop
onAdd- Type
(files: File[]) => void- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onAdd | (files: File[]) => void |
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.