File Upload
The .c-file-upload is a drag-and-drop zone wrapping a native
<input type="file">. The input is visually hidden; the zone is the
click target. Uses :has() for drag-over and disabled states.
Semantic HTML
<label class="c-file-upload">
<input type="file" class="c-file-upload__input" multiple />
<span class="c-file-upload__zone">
<svg class="c-file-upload__icon">...</svg>
<span class="c-file-upload__text">
<strong>Drag files here</strong> or click to browse
</span>
</span>
</label>
Class contract
| Selector | Role |
|---|---|
.c-file-upload | Label wrapper (click target). |
.c-file-upload__input | Hidden native file input. |
.c-file-upload__zone | The visible drop zone. |
.c-file-upload__icon | Upload icon. |
.c-file-upload__text | Instruction text. |
[data-dragging] | Drag-over state (set via JS). |