uploadthing-elements

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

UploadThing Elements

UploadThing Elements

7 file upload components. Requires
@uploadthing/react
(auto-installed as dependency).
共7款文件上传组件,需要依赖
@uploadthing/react
(会作为依赖自动安装)。

Install Pattern

安装方式

bash
npx shadcn@latest add @elements/uploadthing-{name}
bash
npx shadcn@latest add @elements/uploadthing-{name}

Components

组件列表

ComponentInstallDescription
Button
@elements/uploadthing-button
Simple upload button
Dropzone
@elements/uploadthing-dropzone
Drag-and-drop zone with progress
Avatar
@elements/uploadthing-avatar
Avatar upload with crop
File Card
@elements/uploadthing-file-card
File display card
Image Grid
@elements/uploadthing-image-grid
Image gallery from uploads
Paste
@elements/uploadthing-paste
Paste-to-upload area
Progress
@elements/uploadthing-progress
Upload progress indicator
组件安装命令描述
Button
@elements/uploadthing-button
简易上传按钮
Dropzone
@elements/uploadthing-dropzone
带进度的拖拽上传区
Avatar
@elements/uploadthing-avatar
带裁剪功能的头像上传组件
File Card
@elements/uploadthing-file-card
文件展示卡片
Image Grid
@elements/uploadthing-image-grid
上传文件生成的图片画廊
Paste
@elements/uploadthing-paste
粘贴上传区域
Progress
@elements/uploadthing-progress
上传进度指示器

Quick Patterns

快速安装示例

bash
undefined
bash
undefined

Basic upload

基础上传功能

npx shadcn@latest add @elements/uploadthing-button @elements/uploadthing-progress
npx shadcn@latest add @elements/uploadthing-button @elements/uploadthing-progress

Full file management

完整文件管理功能

npx shadcn@latest add @elements/uploadthing-dropzone @elements/uploadthing-file-card @elements/uploadthing-image-grid
npx shadcn@latest add @elements/uploadthing-dropzone @elements/uploadthing-file-card @elements/uploadthing-image-grid

Avatar upload

头像上传功能

npx shadcn@latest add @elements/uploadthing-avatar
undefined
npx shadcn@latest add @elements/uploadthing-avatar
undefined

Setup

配置要求

Requires UploadThing API key and file router. See https://docs.uploadthing.com/getting-started
需要UploadThing API密钥和文件路由,参考:https://docs.uploadthing.com/getting-started

Discovery

探索更多