Search documentation

Search the documentation and open a page.

Displays a file attachment with metadata, status, actions, and optional preview media.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/attachment

Composition

[app-attachment-group] (optional) └── [app-attachment] ├── [app-attachment-trigger] (optional) ├── [app-attachment-media] (optional) ├── [app-attachment-content] │ ├── [app-attachment-title] │ └── [app-attachment-description] └── [app-attachment-actions] (optional) └── [app-attachment-action]

Examples

Default

Loading...

Group

Loading...
Loading...

States

Loading...

Types

Loading...

API Reference

[app-attachment]

Inputs

InputTypeDefaultDescription
state"idle" | "uploading" | "processing" | "error" | "done""done"Sets the attachment's current processing state.
variant"default" | "muted""default"Sets the visual style.
size"default" | "sm" | "xs""default"Sets the attachment size.
type"file" | "card" | "image"—Sets the layout type. Inferred from orientation when omitted.
orientation"horizontal" | "vertical""horizontal"Sets the preferred orientation. File attachments always render horizontally.

[app-attachment-media]

Inputs

InputTypeDefaultDescription
variant"icon" | "image""icon"Sets how the attachment media is styled.

[app-attachment-action]

Inputs

InputTypeDefaultDescription
variant"default" | "destructive" | "ghost" | "link" | "outline" | "secondary""ghost"Sets the button style.
size"default" | "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "sm" | "xl" | "xs""icon-xs"Sets the action button size.