Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

File Input

Lets people choose or drop a file to upload.

Status
ReadyBuild day 10 of 21
Code
In React
Role
Form

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

Drag files here

PNG, JPG, max 5 MB

Pastes as editable layers. Shadows are not exported.

import { FileInput } from "@/ui";

export default function FileInputDemo() {
  function handleFiles(files: File[]): void {
    console.log(files.map((f) => f.name));
  }

  return <FileInput description="PNG, JPG, max 5 MB" accept="image/png,image/jpeg" onFiles={handleFiles} />;
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

type dropzone
Default

Drag files here

PNG, JPG, max 5 MB

Dragging

Drag files here

PNG, JPG, max 5 MB

Uploading

Drag files here

PNG, JPG, max 5 MB

Uploading… 60%
Error

Drag files here

File exceeds 5 MB

Disabled

Drag files here

PNG, JPG, max 5 MB

type button
Default

PNG, JPG, max 5 MB

Dragging

PNG, JPG, max 5 MB

Uploading

PNG, JPG, max 5 MB

Uploading… 60%
Error

File exceeds 5 MB

Disabled

PNG, JPG, max 5 MB

type inline
Default
No file selected
Dragging
No file selected
Uploading
No file selected
Uploading… 60%
Error
No file selected

File exceeds 5 MB

Disabled
No file selected

Pastes as editable layers. Shadows are not exported.

Props

type
"dropzone" | "button" | "inline" · default "dropzone"
The layout.
title
string · default "Drag files here"
The dropzone title.
description
string · default none
The rules shown to the user.
buttonLabel
string · default "Choose file"
placeholder
string · default "No file selected"
Inline only.
accept, multiple
string, boolean · default none
Native file input attributes.
progress
number · default none
0 to 100 while uploading. The upload itself is yours.
error
string · default none
Replaces the description and marks the field.
disabled
boolean · default none
dragging
boolean · default none
Forces the dragging look, for documentation.
onFiles
(files: File[]) => void · default none
Called with the chosen or dropped files.

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

🧰 Type
type
dropzone, button, or inline.
🎯 State
error, disabled, progress, dragging
Hover is the browser. Dragging is a real drag or the prop. Uploading is progress.
Title, Description, Button Value, Placeholder
title, description, buttonLabel, placeholder
Same text.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • Choosing works from the keyboard: Tab to the button and press Enter or Space. Dropping is an extra for pointer users.

Screen readers

  • The button is a real button. The error or description is linked with aria-describedby. Upload progress is a progressbar.

What you still need to do

  • Check the type and size in your code too. accept is only a hint for the file picker.
  • Show uploaded files with the Document component, below the dropzone.

When to use

Documents such as ID cards, receipts, and attachments.

Do and don't

Do

  • State the allowed file types and the size limit before upload.
  • Show upload progress and a way to remove the file.

Don't

  • Accept a file and reject it only after upload.
  • Rely on drag and drop alone: keep a button.

4 of 28 other molecules, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.