Idle
Default dashed glass target.
Glass file drop target — click or drag to pick files. Host apps own accept types, copy, and what happens after selection.
Live
No file selected.
<div class="dropzone glass-focus-surface" data-dropzone>
<input type="file" class="dropzone__input" tabindex="-1" />
<button type="button" class="dropzone__trigger">
<span class="dropzone__icon" aria-hidden="true">
<span class="ui-icon ui-icon--upload"></span>
</span>
<span class="dropzone__title">Drop a file here</span>
<span class="dropzone__hint">Or click to browse</span>
</button>
</div>
import {
Dropzone,
DropzoneTrigger,
DropzoneIcon,
DropzoneTitle,
DropzoneHint,
Icon,
} from 'caustica-design/core'
<Dropzone onFiles={(files) => { /* host handler */ }}>
<DropzoneTrigger>
<DropzoneIcon><Icon name="upload" /></DropzoneIcon>
<DropzoneTitle>{/* host i18n */}</DropzoneTitle>
<DropzoneHint>{/* host i18n */}</DropzoneHint>
</DropzoneTrigger>
</Dropzone>
Default dashed glass target.
.is-drag-over — solid accent rim.
.is-busy — blocks interaction.
.is-loaded — file accepted.
aria-busy while busy; put progress copy in a
role="status" region with aria-live="polite".
| Class | Description |
|---|---|
.dropzone |
Root target — compose with .glass-focus-surface. |
.is-drag-over |
Active while a file is dragged over the zone. |
.is-busy |
Upload / processing in progress. |
.is-loaded |
File accepted; drag/drop typically disabled. |
.dropzone__trigger |
Idle click target that opens the file picker. |
.dropzone__icon / .dropzone__title / .dropzone__hint |
Idle / status content chrome. |
.dropzone__status |
Centered busy or loaded panel. |
From src/core/Dropzone.tsx — root applies
dropzone glass-focus-surface.
| Prop | Type | Default | Description |
|---|---|---|---|
accept |
string |
— | Forwarded to the hidden file input. |
multiple |
boolean |
false |
Allow multiple files. |
busy |
boolean |
false |
Adds .is-busy; blocks drag/drop. |
loaded |
boolean |
false |
Adds .is-loaded; blocks drag/drop. |
onFiles |
(files: File[]) => void |
— | Fired after browse or drop. |
children |
ReactNode |
— | Idle / busy / loaded slots (host-owned). |