Components / Attachment

Attachment

File and image attachments in chat composers, message threads, and upload lists. The chat ruling requires Attachment instead of Item or a custom card.

import { Attachment, AttachmentGroup, AttachmentMedia } from '@layers/ui/attachment'

Rendered stock

House rules

  • Wire state to the real upload status. uploading and processing shimmer the title automatically, so never add a separate spinner.
  • Keep an error reason in AttachmentDescription so failure is communicated by text as well as color.
  • Use AttachmentGroup for multiple attachments. It owns the horizontally scrolling, snapping row and edge fade.
  • Use orientation="vertical" for image-led previews and the default horizontal orientation for compact file rows.