Are you an LLM? You can read better optimized documentation at /components/file-drop-zone.md for this page in Markdown format
File Drop Zone โ
Stable
vue
<script setup lang="ts">
import { HFileDropZone } from '@holistics/design-system'
</script>
<template>
<HFileDropZone style="width: 400px" />
</template>Examples โ
Size Limit โ
vue
<script setup lang="ts">
import { HFileDropZone } from '@holistics/design-system'
const sizeLimit = 5 * 1024 * 1024 // 5MB
const title = 'Upload file (Max 5MB)'
</script>
<template>
<HFileDropZone
style="width: 400px"
:size-limit
:title
/>
</template>Restricted File Types โ
vue
<script setup lang="ts">
import { HFileDropZone } from '@holistics/design-system'
const accept = 'image/png,image/jpeg'
const title = 'Upload images only'
const fileIcon = 'file/image'
</script>
<template>
<HFileDropZone
style="width: 400px"
:accept
:title
:file-icon
/>
</template>API โ
Pass-through: <div> โ
What does this mean?
All props, events, and attrs that are not specified in the tables below will be passed to the element/component described above.
Props โ
| Name | Type | Description |
|---|---|---|
fileIconย | "function" | "cancel" | "copy" | "cut" | "error" | "pause" | "play" | "add-block" | "add-circle" | "add-filter" | "add-tag" | "add" | "address-card" | "adhoc-query" | "ai/file" | ... 448 more ...= "file/document" | Icon displayed in the drop zone area. |
acceptย | string= "*" | A comma-separated list of one or more file types in MIME type format (e.g., {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept} |
sizeLimitย | number= 0 | Maximum file size (in bytes). Set to |
titleย | string= "Select a file to upload" | Main headline or callโtoโaction shown in the drop zone. |
subtitleย | string= "or drag and drop here" | Secondary descriptive text shown below the title in the drop zone. |
heightย | number= 384 | Height (in |
Events โ
| Name | Parameters | Description |
|---|---|---|
@file | [file: File | undefined] |