Blossom UI

File upload

File upload component with drag and drop, accepted types, maximum size, multiple files and a list with remove buttons.

How to use it

Run npx @blossomui/react add file-upload, or copy src/components/UI/FileUpload/FileUpload.tsx into your React project and import it.

import { FileUpload } from './components/ui/FileUpload'

Props

FileUploadProps

PropTypeDescription
labels{ hint?: string; remove?: (name: string) => string }Texts of the component. Pass only the ones you want to change, for example to translate it.
acceptstringAccepted types, same format as the `accept` attribute, for example "image/*,.pdf".
multipleboolean
maxSizeMbnumberMaximum size of each file in megabytes. Bigger files are rejected with an error message.
labelstring
hintstring
disabledboolean
onChange(files: File[]) => voidCalled with the accepted files every time the list changes.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree