Components / FileUpload

FileUpload

Files from the chooser or dropped, with a reason when refused.

Example

The component itself, running in WebAssembly, beside its code in a playground. Try it.

Code

use ravenrs::prelude::*;

fn file_upload() -> impl View {
    let files = State::new(Vec::<PickedFile>::new());
    FileUpload::new(files.binding()).accept(["pdf", "png", "jpg"]).most_files(5).label("Receipts")
}

Open in the playground, with every example →

Full API of FileUpload →