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
| Part | Role |
|---|---|
| Attachment | Picker and dropzone root. |
| AttachmentItem | Single selected file row. |
| AttachmentRemove | Removal 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