Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[upload] Add new Dropzone/Fileupload component #1492

Open
pushys opened this issue Feb 28, 2025 · 2 comments
Open

[upload] Add new Dropzone/Fileupload component #1492

pushys opened this issue Feb 28, 2025 · 2 comments
Labels
component: upload This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@pushys
Copy link

pushys commented Feb 28, 2025

Feature request

It would be great to have an unstyled component for handling file(s) selection.

Summary

Possible structure:

import * as React from 'react';
import { FileUpload } from '@base-ui-components/react/file-upload';

export default function ExampleFileUpload() {
  return (
    <FileUpload.Root>
      <FileUpload.Trigger>Select file</FileUpload.Trigger>
    </FileUpload.Root>
  );
}

Or with a drop zone:

import * as React from 'react';
import { FileUpload } from '@base-ui-components/react/file-upload';

export default function ExampleFileUpload() {
  return (
    <FileUpload.Root multiple accept="image/png">
      <FileUpload.Dropzone>Drop files here</FileUpload.Dropzone>
    </FileUpload.Root>
  );
}

Examples in other libraries

Benchmarks

@pushys pushys added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 28, 2025
@mj12albert mj12albert added new feature New feature or request waiting for 👍 Waiting for upvotes and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 28, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Base UI Feb 28, 2025
@mj12albert
Copy link
Member

I see @colmtuite already has ideas about this 👀
radix-ui/primitives#3305

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 1, 2025

Equivalent to mui/mui-x#2901 for Material UI. I have linked the benchmarks that we have so far for this.

@oliviertassinari oliviertassinari changed the title [FileUpload] Implement a file upload component [FileUpload] Add new Dropzone/upload component Mar 1, 2025
@oliviertassinari oliviertassinari changed the title [FileUpload] Add new Dropzone/upload component [upload] Add new Dropzone/Fileupload component Mar 1, 2025
@oliviertassinari oliviertassinari added the component: upload This is the name of the generic UI component, not the React module! label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: upload This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
Status: Backlog
Development

No branches or pull requests

3 participants