Skip to content
↑↓ to navigate↵ to openesc to close

Menu

File Upload

Attachment Upload

AttachmentUpload.vue

Attachments:

  • launch-brief.pdfUpload failed31 MB
  • orange-flowers.jpg9.3 MB
  • 0:120:48

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/attachment-upload

Import the shared styles once in your application.

TSUsage
import AttachmentUpload from '@/components/beui/blocks/AttachmentUpload.vue'
import '@/components/beui/styles.css'

API Reference

value?
AttachmentUploadItem[]
Default—
defaultValue?
AttachmentUploadItem[]
Default—
@update:model-value?
(items: AttachmentUploadItem[]) => void
Default—
@files-added?
(items: AttachmentUploadItem[], files: File[]) => void
Default—
@files-rejected?
(files: File[], reason: AttachmentRejectReason) => void
Default—
@remove?
(item: AttachmentUploadItem) => void
Default—
@retry?
(item: AttachmentUploadItem) => void
Default—
playingId?
string

Id of the attachment whose audio is playing, from `audioToggle`.

Default—
@audio-toggle?
(item: AttachmentUploadItem) => void
Default—
accept?
string
Default—
multiple?
boolean
Defaulttrue
maxFiles?
number
Default12
maxFileSize?
number
Default500 * 1024 * 1024
disabled?
boolean
Defaultfalse
title?
string
Default—
description?
string
Default—
attachmentsLabel?
string
Default—
labels?
Partial<AttachmentUploadMessages>

Override any built-in string. `{name}` fills the per-attachment labels; `{count}` and `{max}` fill `limitDescription`; `{size}` fills `description`.

Default—
className?
string
Default—
classNames?
AttachmentUploadClassNames
Default—
v-model?
AttachmentUploadItem[]

Alias of `value`, kept from the original port.

Default—
locale?
string

Localizes byte formatting and the `{size}` in the description.

Default—
@value-change?
(items: AttachmentUploadItem[]) => void
Default—

Upload Queue

UploadSurface.vue

Upload package

1 of 3 files ready

  • brand-assets.zip

    ZIP · 18 MB

    Uploaded
  • release-cut.mov

    MOV · 80 MB

    Uploading
  • vendor-contract.pdf

    PDF · 2.7 MB · Connection lost

    Failed

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/file-upload

Import the shared styles once in your application.

TSUsage
import FileUpload from '@/components/beui/blocks/UploadSurface.vue'
import '@/components/beui/styles.css'

API Reference

value?
FileUploadItem[]
Default—
defaultValue?
FileUploadItem[]
Default—
@update:model-value?
(items: FileUploadItem[]) => void
Default—
@files-added?
(items: FileUploadItem[], files: File[]) => void
Default—
@remove?
(item: FileUploadItem) => void
Default—
@retry?
(item: FileUploadItem) => void
Default—
accept?
string

Passed to the picker; the queue itself accepts whatever it is given.

Default—
multiple?
boolean
Defaulttrue
maxFiles?
number
Default—
disabled?
boolean
Defaultfalse
variant?
FileUploadVariant
Defaultdefault
title?
string
Default—
description?
string
Default—
browseLabel?
string
Default—
labels?
Partial<FileUploadMessages>

Override any built-in string. `{name}` fills the per-file labels; `{count}` and `{max}` fill `limitDescription`.

Default—
className?
string
Default—
classNames?
FileUploadClassNames
Default—
v-model?
FileUploadItem[]

Alias of `value`, kept from the original port.

Default—
maxFileSize?
number

Accepted for parity with the docs examples. The queue does not validate size — the React original leaves that to the caller.

Default—
locale?
string

Localizes the byte formatting (`Intl.NumberFormat` units).

Default—
@value-change?
(items: FileUploadItem[]) => void
Default—

Updated