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—

Updated