Components / Content / File Upload
File Upload
A drag-and-drop dropzone that overlays the whole page while a file is dragged over it.
Installation
Install the File Upload React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):
npx shadcn@latest add @ai-primitive/file-upload
Usage
import { FileUpload, FileUploadTrigger, FileUploadContent } from "@/components/ui/file-upload"
Related components
- Markdown - Streaming-safe markdown renderer with GFM support and code blocks built in.
- Response Stream - Animates text in token-by-token (typewriter) or word-by-word (fade).
- JSX Preview - Renders a JSX string as live output, auto-closing open tags mid-stream.
- Image - Displays a URL, base64, or raw-bytes image, with an animated placeholder while pending.
Previous: Image