# Attachment
> File and image cards with upload states.
Import from `@aspyn-io/kit`. Scaffold source: `npx shadcn@latest add https://design.aspyn.io/r/attachment.json`
## Install
```tsx
import {
Attachment,
AttachmentMedia,
AttachmentContent,
AttachmentTitle,
AttachmentDescription,
AttachmentActions,
AttachmentAction,
AttachmentGroup,
} from "@aspyn-io/kit";
```
### File attachment
Media, name, and metadata with an independently clickable action.
```tsx
sales-dashboard.pdf
PDF · 2.4 MB
```
### Upload states
Set state to reflect the lifecycle: idle, uploading, processing, error, done. "error" switches to a destructive treatment.
```tsx
financial-model.xlsx
Upload failed. Try again.
```
### Group
AttachmentGroup lays multiple attachments out in a scrollable, snapping row.
```tsx
…
…
```
## Notes
- Set variant="image" on AttachmentMedia and render an
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.