Attachment
File and media attachment cards — sizes, upload states, image media, and action buttons.
Default
File card with media, title, description, and actions.
Installation
CLI
Also needs
npx @sonojs/ui@latest add button spinner && npm i lucide-reactUsage
attachment.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| state | "idle" · "uploading" · "processing" · "error" · "done" | "done" | Upload / processing visual state on Attachment. |
| size | "default" · "sm" · "xs" | "default" | Control density and padding. |
| orientation | "horizontal" · "vertical" | "horizontal" | Layout direction (vertical suits image thumbnails). |
| variant | "icon" · "image" | "icon" | On AttachmentMedia — icon tile or image fill. |