Components / AI chat
Attachments
Files attached to a message, inline, as a grid or as a list.
@fabrials/ai-ui
Installation
Import the control from
@fabrials/ai-ui, after setting the app up.TypeScript import { Attachments, AttachmentChip } from "@fabrials/ai-ui";import "@fabrials/ai-ui/styles.css";
API reference
| Prop / export | Type | Description |
|---|---|---|
items | AttachmentItem[] | id, name, mediaType, url, size, status and error. |
variant | inline | grid | list | Layout. |
onRemove | (id) => void | Shows a remove button on each file. |
empty | ReactNode | Shown when there are no files. |
Behavior
Presentational. The host uploads the files and reports uploading and error states.
Accessibility
Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.