Skip to content

File attachment

File picker, dropzone, and composable list parts for attachment interfaces.

Examples

Upload files

Overview

Attachment returns selected files through onFiles. Uploading, validation, persistence, and preview URL cleanup remain application responsibilities.

tsx

import { Attachment } from "@standard-ui/react"

<Attachment multiple onFiles={handleFiles}>
  Choose files or drop them here
</Attachment>

API

PartRole
AttachmentPicker and dropzone root.
AttachmentItemSingle selected file row.
AttachmentRemoveRemoval action.

Guidelines

Do

  • State accepted file types and size limits
  • Show upload errors next to the file

Don't

  • Don't imply selection means upload completed