Displays a file attachment with metadata, status, actions, and optional preview media.
Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
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...
Link
Loading...
States
Loading...
Types
Loading...
API Reference
[app-attachment]
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
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
| Input | Type | Default | Description |
|---|---|---|---|
variant | "icon" | "image" | "icon" | Sets how the attachment media is styled. |
[app-attachment-action]
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
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. |
Angular
React
Solid
Svelte
Vue