Attachment
A file or image chip for chat inputs and forms, with an upload fill, a failed state with Retry and a card for images.
Here are the October exports and the close checklist. The 2025 ledger is too large; I will split it.
- close-checklist-q3.pdf2.4 MB
- bank-export-october.csvUploading 20%
- ledger-2025.xlsxOver 10 MB ·
- lisbon-office.jpg1.1 MB
When to use
- Files attached to a message, a ticket or a form.
- A queue of uploads with their own progress.
When not to use
- A page of files with actions per file; use the file manager or items.
Installation
pnpm dlx shadcn@latest add @caliper/attachment
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Attachment
9 props
Also accepts the native props of its root element and a ref.
AttachmentList
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-label and aria-hidden in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/attachment.mdThe index of every part is at /llms.txt.
