Attachment chipsPro
Files on their way into a prompt: a ring of progress round each icon, then type and size; failed uploads offer Retry, files over the limit stay red, and extras fold into +N.
oxyn add attachment-chipsThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Show each file's progress and problems where the user is about to send, without a separate upload panel.
When not to use
- Drag a file into the box to upload it: use Upload dropzone instead.
- An Oxyn original: use Polaroid stack instead.
- An Oxyn original: use Drop lanes instead.
Installation
Attachment chips is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add attachment-chipsUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Six files: the slides fail with Retry, the film is too big, the rest show rings as they upload; the sheet and the doc fold into +2.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Compact
Three chips before +N, slow uploads: the report and the failing slides stay in view, +4 holds the rest.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Roomy
A 60 MB limit and room for eight: nothing is refused or folded.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AttachmentChips
| Prop | Type | Default | Description |
|---|---|---|---|
files | Option<Vec<DemoFile>> | Default::default() | Starting files (six samples when `None`). |
max_mb | f64 | 25.0 | Size limit in MB. |
max_visible | usize | 5 | Chips shown before +N. |
speed | f64 | 1.5 | Megabytes a second for the demo upload. |
on_remove | EventHandler<String> | — | Removed a chip (file name). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Retry and remove on each chip, +N, Add file |
| Enter onN | Shows every chip |
Accessibility
- The tray is a list; each chip's label names the file, its type and size; remove and Retry buttons name the file.
- Upload results are said in a status line; failed and too-big chips say so in text as well as red.
Responsive behaviour
- 520 px composer; chips wrap and long names ellipsize at 150 px.
Edge cases (spec)
520 px composer; names ellipsize at 150 px.
Notes for AI
- Import
AttachmentChipsfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AttachmentChipsElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.