Search documentation

Find a component or a docs page

Attachment

Displays a file or image attached to a message or form, with upload states, actions, and an optional trigger.

Usage

File

Content only

Leave out AttachmentMedia for a compact chip.

States

Upload states

state: :idle shows a dashed border, :uploading and :processing make the title shimmer, :error tints the attachment.

Images

Image tiles

orientation: :vertical with AttachmentMedia(variant: :image). The image is dimmed until the upload is done.

Sizes

Sizes

Group

Scrollable group

AttachmentGroup scrolls sideways and snaps to each attachment, fading the edge that has more to show.

Triggers

Open in a new tab

AttachmentTrigger stretches a link or button over the attachment; its actions stay clickable on top.

Open a dialog

Wrap the trigger in DialogTrigger(class: "contents") so it still covers the attachment.

Installation

Components

ComponentBuilt usingSource
AttachmentPhlex
AttachmentActionPhlex
AttachmentActionsPhlex
AttachmentContentPhlex
AttachmentDescriptionPhlex
AttachmentDocsPhlex
AttachmentGroupPhlex
AttachmentMediaPhlex
AttachmentTitlePhlex
AttachmentTriggerPhlex