Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    Upload

    The Upload component allows users to upload a file manually or using drag and drop.

    View source code
    • Usage
    • Props
    • activeDragContent
      ReactNode

      The contents of the Upload on drag

    • content
      ReactNode

      The contents of the Upload

    • onUpload
      (files: File[], uploadType: UploadType) => void | Promise<void>

      Handler that is called when a file is submitted

    • accept
      string

      One or more unique file type specifiers describing file types to allow. Cf https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers

      Default:
    • className
      string

      className for the element

    • illustration
      ReactNode

      Illustration to use instead of the default icon

    • isInvalid
      boolean

      Whether the Upload is invalid.

      Default: false
    • multiple
      boolean

      Whether the input should allow multiple file

      Default: false