Attachment

File attachment chips and cards for chat interfaces and input forms.

File attachment chips and cards for chat interfaces and input forms.

architecture.pdf1.8 MB
tsx
import {  Attachment,  AttachmentGroup,  AttachmentMedia,  AttachmentContent,  AttachmentTitle,  AttachmentDescription,  AttachmentActions,  AttachmentAction,} from "@celestia-project/ui/composite/attachment"import { FilePdf, X } from "@phosphor-icons/react"
<AttachmentGroup>  <Attachment size="default" state="done" orientation="horizontal">    <AttachmentMedia variant="icon">      <FilePdf />    </AttachmentMedia>    <AttachmentContent>      <AttachmentTitle>document.pdf</AttachmentTitle>      <AttachmentDescription>2.4 MB</AttachmentDescription>    </AttachmentContent>    <AttachmentActions>      <AttachmentAction variant="ghost" size="icon-xs">        <X />      </AttachmentAction>    </AttachmentActions>  </Attachment></AttachmentGroup>

Props Reference

Sub-ComponentPropTypeDefaultDescription
Attachmentstate"idle" | "uploading" | "processing" | "error" | "done""done"Attachment status state
Attachmentsize"default" | "sm" | "xs""default"Sizing variant
Attachmentorientation"horizontal" | "vertical""horizontal"Layout direction
AttachmentMediavariant"icon" | "image""icon"Media preview type