Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

File Picker

Pro

A file picker component with drag-and-drop and validation.

vu-file-picker · @velkin/react-pro/file-picker

Copy page

Import

React
npm i @velkin/react-pro

import { LicenseInfo } from "@velkin/license";
// Vite: import.meta.env.VITE_VELKIN_LICENSE_KEY
// Next: process.env.NEXT_PUBLIC_VELKIN_LICENSE_KEY
LicenseInfo.setLicenseKey(import.meta.env.VITE_VELKIN_LICENSE_KEY ?? process.env.NEXT_PUBLIC_VELKIN_LICENSE_KEY ?? "");

// @velkin-pro
import { VuFilePicker } from "@velkin/react-pro/file-picker";

Examples

API

Props

PropTypeDefaultDescription
filesFile[][]Selected files in multiple mode. Default: `[]`.
filenull | FilenullSelected file in single mode. Default: `null`.
multiplebooleanfalseEnables multiple file selection. Default: `false`.
acceptstring""Comma-separated accepted extensions or wildcards. Default: `""`.
maxSizenumber15Maximum file size in MB. Default: `15`.
errorMessagestring""Current picker validation error (type/size). Default: `""`.
showerrorsboolean—Shows validation after activation (`showerrors` attr). Default: `false`.
validationactiveboolean—Drives invalid styling after activation (`validationactive` attr). Default: `false`.
invalidbooleanfalseTrue when last validation found errors (`invalid` attr). Default: `false`.
showStructurebooleanfalseShows selected files inline. Default: `false`.
showRemoveButtonsbooleantrueShows remove control on each listed file. Default: `true`.
allowAllFilesbooleanfalseSkips extension filtering. Default: `false`.
droppablebooleanfalseEnables drag-and-drop selection. Default: `false`.
dragTextstring""Dropzone placeholder; empty uses locale catalog. Default: `""`.
densityVuFilePickerDensity"default"Dropzone layout density (arrangement; not field `size`). Default: `"default"`.
icon"ion:cloud-upload""ion:cloud-upload"Dropzone icon name. Default: cloud upload icon.
buttonLabelstring""Trigger button label; empty uses locale catalog. Default: `""`.
directorybooleanfalseEnables directory picking mode. Default: `false`.
emitHandlesbooleanfalseIncludes file system handles in event detail. Default: `false`.
filepairIdstring""Pairing id for linked file viewer. Default: `""`.
showErrorsbooleanfalseShows validation after activation.
validationActivebooleanfalseDrives invalid styling after activation.
draggingbooleanfalseTrue while external files are dragged over the dropzone.

Events

EventDetailDescription
vu-changeCustomEventWhen selected files change.
vu-invalidVuFilePickerInvalidDetailWhen validation fails or selection is cancelled.

Slots

SlotDescription
—- Custom dropzone content.
errorReplaces default validation message list when assigned.

CSS parts

PartDescription
fieldColumn that stacks dropzone, optional file list, and error.
dropzoneOuter drop area container.
drop-contentInner dropzone content wrapper.
drop-iconIcon container inside the dropzone.
drop-placeholderEmpty-state placeholder text.
file-picker-buttonBrowse or select-folder trigger button.
drop-overlayFull-surface overlay during drag-over.
file-structureWrapper for the optional file list.
file-listList of selected file names.
file-itemOne selected file row.
file-nameFile name text in the structure list.
file-removeRemove control for one listed file.
error-messageRegion for `slot="error"` or stacked default validation lines.
error-lineOne default validation string when `slot="error"` is empty.

Methods

MethodDescription
validateInput- Runs validators and syncs validity.
openFilePicker- Opens file or directory picker based on directory mode.
clear- Clears current selection and emits `vu-change`.
removeFileAt- Removes one selected file by index.
removeFile- Removes one selected file by reference.
dispatchError- Emits `vu-invalid` and updates error state.

Types

NameDefinition
CustomEvent
VuFilePickerSelectedSingleDetail
| VuFilePickerSelectedMultiDetail
File | null
null | File
VuFilePickerDensity
"default" | "compact" | "comfortable"
VuFilePickerInvalidDetail
{ error: string; }

Related

Inputs

  • Advanced FilterAn advanced filter component with expression input and visual builder.
  • ButtonA clickable button component with multiple variants and states.
  • Button GroupA button group component with shared styling and optional selection.
  • CheckboxA checkbox component with label, hint, and validation.
  • Checkbox GroupA checkbox group component with shared label and validation.
  • Color AreaA two-dimensional color picker component for saturation and brightness.

Guides

  • Pro licenseLicenseInfo and Pro imports
  • FormsFormData, VuForm, and validation
  • EventsonVu* / v-model / e.detail
  • Appearancevariant, color, tone, size

Browse

  • Previous: Date PickerEarlier in the sidebar
  • Next: FormLater in the sidebar
  • All componentsBrowse the full index