# File drop

Drop or choose files, with type and size limits.

Import from `@a31labs/rax/file-drop`.

## Usage

```tsx
<FileDrop accept=".csv" maxSize={1_000_000} hint="CSV, up to 1 MB" onFiles={upload} />
```

## Rules

Props: `onFiles(File[])`, `accept`, `multiple`, `maxSize` (bytes), `disabled`, `label`, `hint`, children (custom preview), plus native div props. A dashed `edge` border that turns to an accent border on accent-soft while a file is dragged over. A native button inside opens the hidden file picker on click, Enter or Space, and its focus ring shows on the whole zone. Dropped files are checked against `accept` too. Files that fail `accept` or `maxSize` are rejected with an inline error (`role="alert"`) naming each file. The input is reset after every pick, so the same file can be chosen again. No upload logic: the app uploads in `onFiles`.

Page: https://rax.a31.at/components/file-drop
