Draft. Ported from the shadcn-vue registry (style reka-nova, read 12 November 2026) and styled with Beehexa tokens. Not yet approved; the API may still change.
Attachment shows one file: an icon or preview, the name, a line about it, and actions such as remove or retry. It shows where the file is in its upload.
When to use
- Files added to a message, a note, an order or a support ticket.
- A row of files people are about to send, while they upload.
When not to use
- For the drop zone where people add files. That is a file input; Attachment shows what was added.
- For a long list of documents to sort and filter. Use a table.
- For a single image that is the content. Show the image.
States
| State | Looks | Use when |
|---|---|---|
done (default) |
Solid color.border edge |
The file is stored |
uploading |
The name shimmers | It is being sent; put the progress in the description: “Uploading · 62%” |
processing |
The name shimmers | It arrived and is being checked or converted |
error |
color.border.danger edge, danger tile, description in color.text.danger |
It failed. Say why and offer Retry |
idle |
Dashed edge | It is chosen but not sent yet |
The state is never shown by transparency: an image preview stays at full strength while it uploads, and the title and description carry the state.
Content
- Show the file name as it is; the description gives the type and size (“PDF · 184 KB”) or the progress.
- An error says what went wrong in words: “Upload failed: the file is larger than 10 MB.”
- Name each action with the file: “Remove invoice-10482.pdf”.
Tokens
- Card:
radius.card, acolor.borderedge oncolor.surface; hover with a triggercolor.background.neutral.subtle.hover, as a row. - Tile:
size.control.large,.defaultand.small(40, 32, 24 px) fordefault,smandxs, oncolor.background.neutralwithradius.control; iconsize.icon.defaultincolor.icon. - Text: name in
font.weight.medium; descriptionfont.body.smallincolor.text.subtle. - Padding
space.100tospace.150; tiles in a groupspace.150apart. - The shimmer’s sheen is
color.skeleton.subtle, the skeleton colour.