Upload dropzonePro
Drag a file into the box to upload it – a progress bar and percent, then Uploaded; one over the limit is refused in red. Real file-type icons on every file.
oxyn add upload-dropzoneThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- The simplest honest upload: one box, what it takes, and what happened to your file.
When not to use
- Files on their way into a prompt: use Attachment chips instead.
- An Oxyn original: use Polaroid stack instead.
- An Oxyn original: use Drop lanes instead.
Installation
Upload dropzone is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add upload-dropzoneUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Drag a file under the box into it – or press it – to watch it upload; the 48 MB film is refused.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Hairline
With a hairline and tighter corners, and a 60 MB limit so the film goes through.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Typed
Only PDFs and images: the archive is turned away by type, not size.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
UploadDropzone
| Prop | Type | Default | Description |
|---|---|---|---|
files | Option<Vec<DemoFile>> | Default::default() | Files offered under the box (a PDF, an image and a too-big video when `None`). |
max_mb | f64 | 10.0 | Size limit in MB. |
accept | Vec<String> | Default::default() | Accepted families (`pdf`, `image`, `doc` …); empty takes any. |
speed | f64 | 1.5 | Megabytes a second for the demo upload. |
stroke | bool | Default::default() | A hairline round the box. |
corner | f32 | 20.0 | Corner radius in px. |
on_upload | EventHandler<String> | — | A file finished uploading (its name). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | The box, then each file |
| EnterorSpace on the box | Adds the next file |
| Enter on a file | Uploads it |
Accessibility
- The box is a button; each file names its type and size and says how to upload it.
- Progress, success and refusals are said in a polite status line; the refusal is red text, not colour alone.
Responsive behaviour
- 340 px wide; the sample files wrap under the box.
Edge cases (spec)
340 px; files wrap under the box.
Notes for AI
- Import
UploadDropzonefromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
UploadDropzoneElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.