Skip to content

Component gallery

  1. Forms
  2. Attachments

Primitives

  • Buttons30
  • Badges21
  • Keys4
  • Status8
  • Avatars8
  • Alerts4
  • Cards10
  • Dropdowns4
  • Corner windows3
  • Dialogs7
  • Windows4
  • Taskbar1
  • Launcher1
  • Desk icons1
  • Progress8
  • Scroll cues2

Forms

  • Toggles5
  • Selects3
  • Inputs8
  • Textareas7
  • Segmented controls4
  • Attachments18

Content

  • Quotes5
  • Stats5
  • Heatmap3
  • Icon lists2
  • Masonry2
  • Accordion2
  • Code8
  • Contact methods7

Chat

  • Messages22
  • Posts29

Showcase

  • Media cards4
  • Logos1
  • 88x31s15
  • Carousel3
  • Blueprint frames2
  • Card grids3

Media

  • Figures4
  • Audio player4
  • Media player3
  • Radio5
  • Shorts2

Toys

  • Terminal4
  • Destructor1
  • Status board7

Sections

  • Section3
  • Side hero2
  • Navbar5
  • Footer1
  • Sidebar2

Display

ThemeT
Mode
Mode
M
Style
Style
Y
Spacing
Spacing
Radius
Radius
Font size
Font size
Compare
Compare
Effects
S

ShortcutsAlt+Shift+key

Components

Primitives

  • Buttons30
  • Badges21
  • Keys4
  • Status8
  • Avatars8
  • Alerts4
  • Cards10
  • Dropdowns4
  • Corner windows3
  • Dialogs7
  • Windows4
  • Taskbar1
  • Launcher1
  • Desk icons1
  • Progress8
  • Scroll cues2

Forms

  • Toggles5
  • Selects3
  • Inputs8
  • Textareas7
  • Segmented controls4
  • Attachments18

Content

  • Quotes5
  • Stats5
  • Heatmap3
  • Icon lists2
  • Masonry2
  • Accordion2
  • Code8
  • Contact methods7

Chat

  • Messages22
  • Posts29

Showcase

  • Media cards4
  • Logos1
  • 88x31s15
  • Carousel3
  • Blueprint frames2
  • Card grids3

Media

  • Figures4
  • Audio player4
  • Media player3
  • Radio5
  • Shorts2

Toys

  • Terminal4
  • Destructor1
  • Status board7

Sections

  • Section3
  • Side hero2
  • Navbar5
  • Footer1
  • Sidebar2

Forms · 6 of 6

Attachments

Files attached to a form or a message, one at a time or in a row.

packages/ui/src/astro/blocks/attachment/attachment.astropackages/ui/src/astro/blocks/attachment/attachment-group.astro3 sections · 18 stories

  • Horizontal11
  • Vertical5
  • Attachment groups2
Preview settings
Width
Preview width
Stage
Stage

Horizontal

Preview width for Horizontal

attachment.astro11 stories

The description names the state; color and shimmer only echo it.

done
Props of done
<Attachment title="cool-dashboard.pdf" icon="lucide:file-text">
    PDF · 2.4 MB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove cool-dashboard.pdf"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/done on its own
cool-dashboard.pdfPDF · 2.4 MB
idle
Props of idle
<Attachment title="notes.md" icon="lucide:file-text" state="idle">
    Ready to upload
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove notes.md"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/idle on its own
notes.mdReady to upload
uploadinganimated
Props of uploading
<Attachment title="cool-report.xlsx" icon="lucide:file-spreadsheet" state="uploading" progress={64}>
    Uploading · 64%
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove cool-report.xlsx"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/uploading on its own
cool-report.xlsxUploading · 64%
processinganimated
Props of processing
<Attachment title="research-summary.pdf" icon="lucide:file-text" state="processing">Processing document</Attachment>
Open attachment/processing on its own
research-summary.pdfProcessing document
error
Props of error
<Attachment title="recording.mov" state="error">
    Failed · File exceeds 100 MB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Retry recording.mov"><Icon name="lucide:rotate-cw" /></Button>
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove recording.mov"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/error on its own
recording.movFailed · File exceeds 100 MB
image
Props of image
<Attachment title="greg.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")}>JPG · 184 KB</Attachment>
Open attachment/image on its own
greg.jpgJPG · 184 KB
link
Props of link
<Attachment title="test-pattern.jpg" image={image("/_astro/test-pattern.CRwj5U5U.jpg")} href="/_astro/test-pattern.CRwj5U5U.jpg" download>
    Click to download
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove test-pattern.jpg"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/link on its own
test-pattern.jpgClick to download
long-name
Props of long-name
<Attachment title="an-unreasonably-long-file-name-that-will-not-fit-v2-final-FINAL.tar.gz" icon="lucide:file-archive">TAR.GZ · 48.1 MB</Attachment>
Open attachment/long-name on its own
an-unreasonably-long-file-name-that-will-not-fit-v2-final-FINAL.tar.gzTAR.GZ · 48.1 MB
size-lg
Props of size-lg
<Attachment title="main.ts" icon="lucide:file-code" size="lg">
    TypeScript · 3 KB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove main.ts"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/size-lg on its own
main.tsTypeScript · 3 KB
size-default
Props of size-default
<Attachment title="main.ts" icon="lucide:file-code" size="default">
    TypeScript · 3 KB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove main.ts"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/size-default on its own
main.tsTypeScript · 3 KB
size-sm
Props of size-sm
<Attachment title="main.ts" icon="lucide:file-code" size="sm">
    TypeScript · 3 KB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove main.ts"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment/size-sm on its own
main.tsTypeScript · 3 KB

Vertical

Preview width for Vertical

attachment.astro5 stories

For image previews: the media stacks above the name.

lg
Props of lg
<Attachment title="greg.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")} orientation="vertical" size="lg">
    JPG · 184 KB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove greg.jpg"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment-vertical/lg on its own
greg.jpgJPG · 184 KB
default
Props of default
<Attachment title="greg.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")} orientation="vertical" size="default">
    JPG · 184 KB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove greg.jpg"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment-vertical/default on its own
greg.jpgJPG · 184 KB
sm
Props of sm
<Attachment title="greg.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")} orientation="vertical" size="sm">
    JPG · 184 KB
    <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove greg.jpg"><Icon name="lucide:x" /></Button>
</Attachment>
Open attachment-vertical/sm on its own
greg.jpgJPG · 184 KB
icon
Props of icon
<Attachment title="slides.key" icon="lucide:presentation" orientation="vertical">Keynote · 12 MB</Attachment>
Open attachment-vertical/icon on its own
slides.keyKeynote · 12 MB
uploadinganimated
Props of uploading
<Attachment title="test-pattern.jpg" image={image("/_astro/test-pattern.CRwj5U5U.jpg")} orientation="vertical" state="uploading" progress={30}>Uploading · 30%</Attachment>
Open attachment-vertical/uploading on its own
test-pattern.jpgUploading · 30%

Attachment groups

Preview width for Attachment groups

attachment-group.astro2 stories

Scrolls sideways and snaps; the overflowing edges fade.

defaultanimated
Props of default
<AttachmentGroup label="Attachments">
    <Attachment title="cool-dashboard.pdf" icon="lucide:file-text">
        PDF · 2.4 MB
        <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove cool-dashboard.pdf"><Icon name="lucide:x" /></Button>
    </Attachment>
    <Attachment title="greg.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")}>
        JPG · 184 KB
        <Button slot="actions" size="icon-sm" variant="ghost" tone="neutral" aria-label="Remove greg.jpg"><Icon name="lucide:x" /></Button>
    </Attachment>
    <Attachment title="cool-report.xlsx" icon="lucide:file-spreadsheet" state="uploading" progress={64}>Uploading · 64%</Attachment>
    <Attachment title="recording.mov" state="error">Failed · Too large</Attachment>
    <Attachment title="main.ts" icon="lucide:file-code">TypeScript · 3 KB</Attachment>
</AttachmentGroup>
Open attachment-group/default on its own
cool-dashboard.pdfPDF · 2.4 MB
greg.jpgJPG · 184 KB
cool-report.xlsxUploading · 64%
recording.movFailed · Too large
main.tsTypeScript · 3 KB
vertical
Props of vertical
<AttachmentGroup label="Images">
    <Attachment title="photo-1.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")} orientation="vertical" size="sm" />
    <Attachment title="photo-2.jpg" image={image("/_astro/test-pattern.CRwj5U5U.jpg")} orientation="vertical" size="sm" />
    <Attachment title="photo-3.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")} orientation="vertical" size="sm" />
    <Attachment title="photo-4.jpg" image={image("/_astro/test-pattern.CRwj5U5U.jpg")} orientation="vertical" size="sm" />
    <Attachment title="photo-5.jpg" image={image("/_astro/greg.B9OwiVM9.jpg")} orientation="vertical" size="sm" />
</AttachmentGroup>
Open attachment-group/vertical on its own
photo-1.jpg
photo-2.jpg
photo-3.jpg
photo-4.jpg
photo-5.jpg
PreviousSegmented controlsNextQuotes