Menu
Esc
DocsGitHub TR

Components

Uploader

Picks files by dragging them in or with the Select button, shows the upload progress and lists the files.

Open in Figma

Playground

Drag & Drop files hereorMaximum allowed size is 100 MB

Figma variant

✈️ Direction=Vertical
🕹 State=Default
Disable=False
Error=False

Directions

Horizontal is a single row for forms. Vertical is a larger drop area with a hint for the limits.

Drag files hereor
Drag & Drop files hereorMaximum allowed size is 100 MB

States

Hover draws the primary tint line; Pressed and Drag Hover turn the background surface/level-2, and Drag Hover shows “Drop file now” in primary. Loading shows the progress bar, Loaded lists the files above a compact drop zone.

Drag files hereor
Drop file now
Drag files hereor
Drag files hereor
  • Cover.png4.7 Kb
  • Report-Q3.pdf2.2 Mb
Drag files hereor
Drag & Drop files hereorMaximum allowed size is 100 MB
45 Mb / 98 Mb
  • Cover.png4.7 Kb
  • Report-Q3.pdf2.2 Mb
Drag files hereor

Tokens

PartToken
Box--color-surface-level-1, --color-foreground-low-emphasis line, --radius-form-element-small
Dashed zone--border-width dashed --color-surface-level-4
Hover--color-primary-tint
Pressed / drag--color-surface-level-2, --color-primary dash
Error--color-error
Title / or / hint--color-foreground-high-emphasis / --color-foreground-low-emphasis

Notes from Figma

  • The dashes are 8px with 4px gaps; code uses the border-dashed style (--border-width dashed), whose pattern comes from the browser.
  • Horizontal sits in a box with a foreground/low-emphasis line, which Vertical does not have until files are listed.
  • Horizontal Hover, Pressed and Drag Hover are 56px tall instead of 40px; code keeps the height.
  • The Vertical empty variants have no fill but Error has surface/level-1; code follows this.
  • The file name uses an unbound 12px style; code uses ui/footnote/bold (Horizontal) and ui/text small/bold (Vertical).
  • Horizontal Error merges the title and “or” into one low-emphasis text and adds the error icon; code keeps two texts with the same colors.
  • Figma has no focus state; code rings the drop zone when its button is focused.
  • In the compact zone the button shows only the upload icon; code names it with browseLabel.

Figma to code

FigmaReact
✈️ Direction = Horizontal / Verticaldirection='horizontal' / 'vertical'
🕹 State = Hover / Pressed:hover / :active
🕹 State = Drag Hovera file dragged over it
🕹 State = Loadingprogress={…}
🕹 State = Loadedfiles={[…]}
Error / Disableerror / disabled