Skip to main content
Version: v1 (Current)

File Uploader

Generated from public Vue/TypeScript exports by pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commit fc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.

FileUploader​

import { FileUploader } from '@gxp-dev/app-ui'

Repository source

Props​

NameTypeRequired / defaultDescription
buttonTextstring | undefined"Upload from Device"—
acceptImagesboolean | undefinedtrue—
acceptVideosboolean | undefinedtrue—
acceptAudioboolean | undefinedfalse—
maxFileSizenumber | undefined0Maximum original file size in bytes; 0 means unlimited.
dropzoneboolean | undefinedfalseShow a drag/drop target while retaining the accessible picker button.
disabledboolean | undefinedfalse—
multipleboolean | undefinedfalse—
buttonClassstring | undefined—Class for the trigger button. When set it REPLACES the default styling — pass the host's button class (e.g. primaryButton) so the uploader matches the surrounding buttons instead of the package's shadcn-token default (which doesn't resolve outside the package).

Events​

NameTypeRequired / defaultDescription
file-selected[payload: FileSelectedPayload]——
file-cleared[]——
upload-error[message: string]——
upload-started[]——
upload-cancelled[]——

Exposed methods and values​

NameTypeRequired / defaultDescription
clearFile() => void——

Examples​

These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.

Default​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import FileUploader from './FileUploader.vue'
{
args: {
buttonText: 'Upload from Device',
acceptImages: true,
acceptVideos: true,
multiple: false,
},
}

ImagesOnly​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import FileUploader from './FileUploader.vue'
{
args: {
buttonText: 'Upload Image',
acceptImages: true,
acceptVideos: false,
multiple: false,
},
}

VideosOnly​

import type { Meta, StoryObj } from '@storybook/vue3-vite'
import FileUploader from './FileUploader.vue'
{
args: {
buttonText: 'Upload Video',
acceptImages: false,
acceptVideos: true,
multiple: false,
},
}