Composer tray with removable attachments
For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.
Best for: A chat textarea topped by xs chips that scroll sideways, a paperclip that adds files and a live attached count
When to use
- Files carried by a chat turn, as chips in a composer tray or cards in an assistant reply
- Upload queues and pickers where each file reads as idle, uploading, processing, failed or done
- Rows of image thumbnails or file chips that scroll sideways on one line instead of wrapping
When not to use
- Picked files from the system dialog, checked against count, size and type limits: use the Attachment File Picker example
- A drop zone that takes files dragged in from the desktop: use the File Upload component
- A colored format badge that labels a document by its extension, such as PDF: use the File Type component
- An upload list where each row needs a bar filling toward 100 percent: use the Progress component
Agent notes
- The paperclip appends the next entry of
FILESrather than opening a file dialog; wire a real picker as inc-attachment-6 - The
formonSubmitonly callspreventDefault, so Send posts nothing until you add your handler Attachmentuploads nothing and only styles thestateyou pass, so setstatefrom your own transfer code- The radix
ButtonbehindAttachmentActionsets notype, so passtypebutton inside aformor it submits
https://web.dev.reui.io/components/attachment/c-attachment-2.mdget_example("c-attachment-2")npx shadcn@latest add @reui/c-attachment-2Shadcn Components in Attachment Composer Tray
About Shadcn Attachment Composer Tray
Composer tray with removable attachments. Built by composing Attachment, Field, Input Group. A free, open source shadcn attachment example you can install with npx shadcn@latest add @reui/c-attachment-2 and edit as your own code.
What You Can Build With Shadcn Attachment Composer Tray
- Composes Attachment, Field, Input Group, so it drops into any project already using those components.
- Install it with the shadcn CLI: npx shadcn@latest add @reui/c-attachment-2
- Open source and free, with the full source on this page to copy or adapt.
More Shadcn Attachment Examples
- Assistant Reply Single file attachment in an assistant reply
- Image Strip Image thumbnails in a snapping strip
- Three Sizes Three sizes carrying three levels of an answer
- Upload Queue Upload queue across all five states
- File Picker File picker that fills an attachment tray
Related Shadcn Component Categories
Open-source shadcn autocomplete components for smart search, typeahead inputs, and suggestion lists.
Open-source shadcn avatar components for user profiles, team directories, and comment threads.
Open-source shadcn badge components for status labels, feature tags, and count indicators.
Open-source shadcn breadcrumb components for navigation trails, docs hierarchy, and app wayfinding.
Open-source shadcn bubble components for chat threads, assistant replies, and message reactions.
Open-source shadcn button components for primary actions, form submissions, and toolbar controls.
Frequently Asked Questions
When should I use Shadcn Attachment Composer Tray?
Use it for a chat textarea topped by xs chips that scroll sideways, a paperclip that adds files and a live attached count.
Shadcn Attachment as a whole fits:
- Files carried by a chat turn, as chips in a composer tray or cards in an assistant reply
- Upload queues and pickers where each file reads as idle, uploading, processing, failed or done
- Rows of image thumbnails or file chips that scroll sideways on one line instead of wrapping
For picked files from the system dialog, checked against count, size and type limits, use the Attachment File Picker example. For a drop zone that takes files dragged in from the desktop, use the File Upload component. For a colored format badge that labels a document by its extension, such as PDF, use the File Type component. For an upload list where each row needs a bar filling toward 100 percent, use the Progress component.
How do I install Shadcn Attachment Composer Tray?
Is Shadcn Attachment Composer Tray free to use?
Which components does Shadcn Attachment Composer Tray use?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.