One file in a list, a composer or a queue: type, name, size, progress, error with Retry, Download and Remove.
Attachment states
Install
npx shadcn add @syncrobotic/attachment Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/file-type, @syncrobotic/file-upload, @syncrobotic/progress
Overview
A file row, chip or image tile showing a file's type, name, size and state.
When to use
- Upload queues with progress.
- Files attached to an incident or message.
- Image strips with previews.
Use something else
- Picking files: File upload.
- A file browser with many columns: Data grid.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Attachment chips
Attachment in composer
Attachment images
Attachment read only
Attachment gallery
Attachment long name
Usage rules
- An error says why in words and offers Retry.
- Remove is always the last action, and names the file for screen readers.
Changelog
- 0.23.12026-11-21Removes a stale lint comment for a rule this kit does not use. No visible change.
- 0.23.02026-11-20Every word it says can be translated without editing the source:
labels(AttachmentLabels: "Upload failed", "Failed", the percentage, and the Retry, Download, Cancel, Remove and progress names). - 0.9.02026-11-17New.