Attachment stripPro
Composer attachments as 56 px tiles: queued files land one after another while a ring draws round the uploading tile and a small percent counts up, then blurs away.
oxyn add attachment-stripThe 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
- Composer attachments as 56 px tiles above the prompt: images show a thumbnail (or a placeholder), everything else a document mark (file_icon) with a short name (tile_name).
- Uploads run one after another (tile_upload): each tile lands when the one before finishes, a ring draws clockwise round the uploading tile and a 9 px percent counts up in its corner with an ease-out curve; at 100 the percent blurs out on the same spot over 320 ms and the ring goes.
- Queued files wait as a dashed +n tile (or all show at once with land: false).
- Dismiss sits in the corner, shown on hover or focus once a tile is up.
When not to use
- Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
- The model menu of an AI chat: use Model Picker instead.
- The prompt box for an agent, in six layouts: use Composer instead.
Installation
Attachment strip 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-stripUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Batch
Five files: each lands as the one before finishes.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
One
One image.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
All at once
All tiles shown, queued ones waiting.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AttachmentStrip
| Prop | Type | Default | Description |
|---|---|---|---|
filesrequired | Vec<String> | — | File names. |
weights | Vec<f32> | Default::default() | Relative upload weights (size), same order; missing = 1. |
thumbs | Vec<Option<String>> | Default::default() | Thumbnail URLs for image files, same order (`None` draws a placeholder). |
added | ClockMs | Default::default() | When the batch was added. |
nowrequired | ClockMs | — | Shared clock. |
dur_ms | u64 | 1400 | Upload time of a weight-1 file, ms. |
land | bool | true | Show only tiles whose upload has started (queued files land one after another). |
on_remove | EventHandler<usize> | — | Dismiss pressed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | To each tile's dismiss button (shown on focus) |
Accessibility
- Tiles are list items labelled with the file name and upload percent; a polite status says when all files are up.
- Reduced motion drops the landing and the ring transition; the percent still counts.
From the spec
- Tiles are list items labelled with the name and percent; a polite status says when all files are up.
Motion & interaction
Timing
- Landing 340 ms overshoot; ring follows the clock; percent blur 0 → 4 px with the fade.
- Reduced motion: no landing or ring transition; percent still counts.
Responsive behaviour
- Tiles wrap onto a second row.
Edge cases (spec)
- Tiles wrap.
Notes for AI
- Import
AttachmentStripfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AttachmentStripElinoxyn_gpui. - Props to set first:
files,now. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.