Attachment
File and image cards with upload states.
shadcn/ui · new-york-v4 · synced Aug 29, 2026shadcn/uinew-york-v4 · synced Aug 29, 2026
Installation
import {
Attachment,
AttachmentMedia,
AttachmentContent,
AttachmentTitle,
AttachmentDescription,
AttachmentActions,
AttachmentAction,
AttachmentGroup,
} from "@aspyn-io/kit";File attachment
Media, name, and metadata with an independently clickable action.
Upload states
Set state to reflect the lifecycle: idle, uploading, processing, error, done. "error" switches to a destructive treatment.
Group
AttachmentGroup lays multiple attachments out in a scrollable, snapping row.
Notes
- Set variant="image" on AttachmentMedia and render an <img> inside for image previews; orientation="vertical" stacks the media above the content.
- AttachmentTrigger is a full-card overlay (link or dialog) that sits behind AttachmentActions, so the card is clickable while the actions stay independently operable — give both aria-labels.
- AttachmentAction renders a Button; keep icon-only actions labeled with aria-label.