Datei-Upload (Dropzone) — component.file-upload
Lokale Dateiauswahl mit Dropzone oder Composer-Overlay, entfernbaren Dateikarten und optionalen Bild-, PDF-, Audio-, Video- und Textvorschauen. Ohne uploadUrl kein eigener Serverupload; v1.3 (opt-in): uploadUrl sendet die Dateien einzeln an einen Endpunkt gleicher Herkunft. v1.4 (opt-in): name/requi
Beispiele
Dropzone (klicken oder Dateien hineinziehen)
Profilbild mit Zuschnitt (crop)
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
crop | object | — |
label | string | "" |
hint | string | "PNG, JPG oder PDF (max. 10 MB)" |
multiple | boolean | true |
accept | string | "" |
capture | string: | user | environment | "" |
spacing | string: default | none | sm | md | lg | xl | "default" |
padding | string: standard | none | sm | md | lg | xl | "standard" |
margin | string: standard | none | sm | md | lg | xl | "standard" |
border | string: standard | none | hairline | strong | "standard" |
radius | string: standard | none | control | surface | pill | "standard" |
textColor | string | "" |
backgroundColor | string | "" |
shadow | string: standard | none | sm | md | lg | "standard" |
width | string: standard | full | "standard" |
alignSelf | string: standard | start | center | end | "standard" |
anchor | string | "" |
variant | string: dropzone | composer | social | "dropzone" |
previews | boolean | false |
maxSize | number | 0 |
uploadUrl | string | "" |
chunkSize | number | 0 |
resumable | boolean | true |
reloadAfter | boolean | true |
uploadLabel | string | "Hochladen" |
name | string | "" |
countName | string | "" |
required | boolean | false |
maxFiles | number | 0 |
browseLabel | string | "Fotos oder Dateien hinzufügen" |
Events & Slots
Events: files, uploaded, uploadprogress, uploaderror
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--file-upload-action-primary | var(--color-action-primary) |
--file-upload-border-default | var(--color-border-default) |
--file-upload-border-strong | var(--color-border-strong) |
--file-upload-form-background | var(--form-background) |
--file-upload-radius-control | var(--radius-control) |
--file-upload-radius-sm | var(--radius-sm) |
--file-upload-radius-surface | var(--radius-surface) |
--file-upload-status-danger | var(--color-status-danger) |
--file-upload-surface-sunken | var(--color-surface-sunken) |
--file-upload-text-default | var(--color-text-default) |
--file-upload-text-muted | var(--color-text-muted) |
--file-upload-social-background | var(--color-surface-sunken) |
--file-upload-social-radius | var(--radius-control) |
--file-upload-social-media-height | var(--container-xs) |
--file-upload-social-remove-background | var(--color-surface-overlay) |
--file-upload-crop-preview | calc(var(--size-12) * 2) |
--file-upload-crop-stage | min(100%, calc(var(--size-16) * 5)) |
--file-upload-crop-shape | var(--radius-full) |
--file-upload-crop-control | var(--app-control-primary, var(--file-upload-action-primary)) |
Genutzte Design-Tokens
app.control-primary border.emphasis border.hairline color.action.primary color.border.default color.border.focus color.border.strong color.status.danger color.status.success color.surface.backdrop color.surface.default color.surface.overlay color.surface.sunken color.text.default color.text.muted container.2xs container.lg container.xs duration.fast easing.standard elevation.raised focus.ring-color focus.ring-offset focus.ring-width font.family.default form.background layer.dropdown radius.control radius.full radius.sm radius.surface size.1 size.12 size.16 size.2 size.20 size.3 size.4 size.6 size.8 state.disabled-opacity text.sm text.xl text.xs weight.medium weight.semibold