Attachment presents file metadata without owning upload transport; supply
state and progress from any uploader.
Chat UI
Attachment
File and image attachment chips with metadata, upload states, and determinate or indeterminate progress.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
File and image attachment chips with metadata, upload states, and determinate or indeterminate progress.
Attachment presents file metadata without owning upload transport; supply
state and progress from any uploader.
import { Attachment } from "smthrs/ui";
<Attachment
name="report.pdf"
state="uploading"
sizeBytes={8192}
progress={48}
onRemove={() => removeFile("report.pdf")}
/>
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | required | Visible filename and removal label. |
state | "uploading" | "processing" | "ready" | "error" | "ready" | Upload lifecycle state. |
sizeBytes | number | Not set | Humanized with the shared byteCountString. |
mediaType | string | Not set | MIME metadata shown for ready files. |
thumbnailUrl | string | Not set | Image preview; otherwise an extension tile renders. |
progress | number | null | Not set | 0–100 is determinate; null is indeterminate; omitted hides the bar. |
onRemove | () => void | Not set | Adds an accessible removal button. |