AttachmentList
moleculesRemovable file chips that collapse to square tiles in narrow containers; a tile popover carries the full name, size, preview and actions.
Attachments on a draft
files, onremove and onopen; tiles="auto" switches to tiles at 30rem, so drag the handle to watch the chips collapse.
Draft reply · 5 attachments
Chips, tiles and numbering
tiles forces the tile form (images show a thumbnail); numbered badges each position to match [#N] markers in a prompt.
Chips Tiles Numbered, with an open action
States
read-only (no onremove), files without a size, look-alike names keeping their tail visible, and an empty list rendering nothing.
Read-only Look-alike names: the head is clipped, the tail stays Empty list (renders nothing)
Props
| Prop | Type | Default | Description |
|---|---|---|---|
files required | (File | Attachment)[] | — | |
onremove | (index: number) => void | — | |
onopen | (index: number) => void | — | Makes the chip name a button and adds a preview + Open action to the tile popover. |
tiles | boolean | 'auto' | 'auto' | `auto` switches to tiles when the list is at most 30rem wide. |
numbered | boolean | false | Shows each file's 1-based position, matching `[#N]` markers in a prompt. |
removeLabel | string | 'Remove' | |
openLabel | string | 'Open' | |
class | string | '' | |
style | string | '' |