Skip to content
Back

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-dropzone
Drop a file hereUp to 10 MB
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

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

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.

Terminal
oxyn add upload-dropzone

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Default

Drag a file under the box into it – or press it – to watch it upload; the 48 MB film is refused.

Drop a file hereUp to 10 MB
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Hairline

With a hairline and tighter corners, and a 60 MB limit so the film goes through.

Drop a file hereUp to 60 MB
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Typed

Only PDFs and images: the archive is turned away by type, not size.

Drop a file herePDF, IMAGE · up to 20 MB
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

UploadDropzone

PropTypeDefaultDescription
filesOption<Vec<DemoFile>>Default::default()Files offered under the box (a PDF, an image and a too-big video when `None`).
max_mbf6410.0Size limit in MB.
acceptVec<String>Default::default()Accepted families (`pdf`, `image`, `doc` …); empty takes any.
speedf641.5Megabytes a second for the demo upload.
strokeboolDefault::default()A hairline round the box.
cornerf3220.0Corner radius in px.
on_uploadEventHandler<String>—A file finished uploading (its name).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabThe box, then each file
EnterorSpace on the boxAdds the next file
Enter on a fileUploads 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 UploadDropzone from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: UploadDropzoneEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI