On this page

Attachment

When to use Attachment, its states, content and the tokens it uses.

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, a color.border edge on color.surface; hover with a trigger color.background.neutral.subtle.hover, as a row.
  • Tile: size.control.large, .default and .small (40, 32, 24 px) for default, sm and xs, on color.background.neutral with radius.control; icon size.icon.default in color.icon.
  • Text: name in font.weight.medium; description font.body.small in color.text.subtle.
  • Padding space.100 to space.150; tiles in a group space.150 apart.
  • The shimmer’s sheen is color.skeleton.subtle, the skeleton colour.