Migrating from ghl-ui Upload to HighRise Upload
This guide explains how to move from UIUpload to HighRise HLUpload. HighRise keeps the same UploadFileInfo[] model, switches binding to v-model:file-list, and adds inline/button trigger options.
Component Implementation Changes
Import Changes
diff
- import { UIUpload } from '@gohighlevel/ghl-ui'
+ import { HLUpload } from '@platform-ui/highrise'Basic Usage Changes
diff
- <UIUpload :fileList="files" @change="handleChange" />
+ <HLUpload
+ id="file-upload"
+ v-model:file-list="files"
+ accept="image/*"
+ @change="handleChange"
+ />Props Changes
| ghl-ui Prop | HighRise Prop | Notes |
|---|---|---|
fileList | v-model:file-list | Same UploadFileInfo[] payload; two-way binding uses the file-list model |
multiple | multiple | Same behavior |
max | max | Max file count |
type | type | draggable (default) or button; HighRise also supports inline |
buttonProps | button-props | Passed to the internal HLButton when type="button" |
showDownloadButton | show-download-button | Shows download action in the list |
accept | accept | Same MIME filter |
disabled | disabled | Same behavior |
onDownload | on-download | Override default download; also emits download |
| – | inline | New inline trigger; pairs with the built-in HLUploadList |
Examples
Drag-and-drop Upload
vue
<template>
<HLUpload id="profile-upload" v-model:file-list="files" accept="image/*">
<template #extra>
<div class="flex flex-col items-center gap-1 text-gray-600">
<span class="font-medium text-blue-600">Click to upload</span>
<span>or drag and drop PNG/JPG</span>
</div>
</template>
</HLUpload>
</template>
<script setup>
import { ref } from 'vue'
import { HLUpload } from '@platform-ui/highrise'
const files = ref([])
</script>Button-trigger Upload
vue
<template>
<HLUpload
id="invoice-upload"
type="button"
v-model:file-list="files"
:button-props="{ variant: 'primary', size: 'md' }"
:show-download-button="true"
@download="handleDownload"
>
<template #buttonContent>Upload invoice</template>
</HLUpload>
</template>
<script setup>
import { ref } from 'vue'
import { HLUpload } from '@platform-ui/highrise'
const files = ref([])
const handleDownload = file => {
// optional custom download
console.log('download', file)
}
</script>Inline Upload
vue
<template>
<HLUpload id="inline-upload" inline v-model:file-list="files" :max="3">
<template #inlineUploadLabelText>Attach files</template>
</HLUpload>
</template>
<script setup>
import { ref } from 'vue'
import { HLUpload } from '@platform-ui/highrise'
const files = ref([])
</script>Best Practices
- Prefer
v-model:file-listupdate cycles stay in sync. - Use
type="button"when you need a button-only trigger; keepdraggablefor drop-zones. - Provide
acceptandmaxto set clear upload constraints. - Use
on-download+@downloadto plug in custom download flows. - Disable the control while uploads are in-flight to avoid duplicate selections.
Additional Notes
- Emits
change,remove,update:file-list, anddownload(whenon-downloadis supplied). - Exposes
clear(),submit(), andopenFileDialog()via refs for advanced control. - Uses the built-in
HLUploadListto render the list consistently across variants.