# UGFileInput 文件选择

> 适配器：React；状态：available；slug：`file-input`。

保留原生文件选择与表单语义，并统一字段状态和 File 列表回调。

## 适用场景

- 通过原生文件选择器收集单个或多个本地文件。

## 不适用场景

- 拖拽上传、上传进度、对象存储请求属于业务组合，不由 FileInput 发起。

## 公开入口

- 包入口：`@ug666/ui-react/components`
- 公开成员：`UGFileInput`
- 交互文档：[https://ui.ug666.top/react/components/file-input](https://ui.ug666.top/react/components/file-input)

```tsx
import { UGFileInput } from '@ug666/ui-react/components'
```

## 使用规则

- 使用 accept 和 multiple 表达选择约束；上传请求、大小校验和失败重试留在业务层。
- 受控值使用当前组件声明的 value/onValueChange 或公开回调。
- 涉及 Hook、Portal 或浏览器状态时保留 client boundary。
- 只通过公开 Props、事件、插槽、class/className 和语义 Token 扩展。

## 相关候选

- [fieldset](https://ui.ug666.top/ai/react/components/fieldset.md)
- [input](https://ui.ug666.top/ai/react/components/input.md)
- [form](https://ui.ug666.top/ai/react/components/form.md)

## 生成前检查

- 当前适配器是否真实提供该组件。
- 导入路径、组件名和 API 是否存在于当前版本类型声明。
- 是否覆盖长文本、窄容器、键盘、焦点、disabled、loading 和错误状态。
