---
title: "File Upload"
description: "A drop zone that also opens a file picker from the keyboard."
---

A drop zone that also opens a file picker from the keyboard. Compose it from the exported registry parts so local content and behaviour stay in the application while the visual contract stays token-driven.

_Live example of File Upload — see the page for the rendered demo._

## Installation

```bash
npx newtui@latest add file-upload
```

Files written — React: components/ui/file-upload.tsx. Vue: components/ui/file-upload/FileUpload.vue, components/ui/file-upload/index.ts.

## Usage

React:

```tsx
import { FileUpload } from "@/components/ui/file-upload"
```

Vue:

```ts
import { FileUpload } from "@/components/ui/file-upload"
```

## API reference

**`FileUpload`**

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children / default slot` | `React.ReactNode / Vue slot` | — | Content rendered inside the component. |
| `className / class` | `string` | — | Additional classes merged with the component defaults. |

## Accessibility

Preserve the native semantics of the rendered elements and pass through ARIA attributes when the surrounding context needs a label or description. Any interactive child needs a visible focus indicator, and meaning must not rely on colour alone.

## Tokens

File Upload reads its colours, radii and motion from the `--newt-*` tokens. Override a token rather than editing the component.
