{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "file-upload",
  "title": "File upload",
  "description": "An asset-upload card with a drag-and-drop dropzone and a progress-tracked upload queue.",
  "registryDependencies": [
    "card",
    "button",
    "progress",
    "separator",
    "https://www.quilldesignsystem.com/r/icon.json"
  ],
  "files": [
    {
      "path": "registry/blocks/file-upload.tsx",
      "content": "import {\n  Card,\n  CardHeader,\n  CardTitle,\n  CardDescription,\n  CardContent,\n  CardFooter,\n} from '@/components/ui/card'\nimport { Button } from '@/components/ui/button'\nimport { Icon } from '@/components/ui/icon'\nimport { Progress } from '@/components/ui/progress'\nimport { Separator } from '@/components/ui/separator'\n\nconst files = [\n  { name: 'brand-lockups.zip', size: '4.2 MB', progress: 100, state: 'done' },\n  { name: 'declaration.webp', size: '189 KB', progress: 100, state: 'done' },\n  { name: 'field-notes-issue-001.pdf', size: '2.8 MB', progress: 64, state: 'uploading' },\n] as const\n\n/** An asset-upload card with a drag-and-drop dropzone and a progress-tracked upload queue. */\nexport function FileUpload() {\n  return (\n    <Card className=\"w-card-lg\">\n      <CardHeader>\n        <CardTitle>Upload assets</CardTitle>\n        <CardDescription>SVG, PNG, PDF or ZIP — up to 25 MB each.</CardDescription>\n      </CardHeader>\n      <CardContent className=\"flex flex-col gap-4\">\n        <button\n          type=\"button\"\n          className=\"flex flex-col items-center gap-2 rounded-lg border border-dashed border-input bg-transparent px-6 py-10 text-center transition-colors hover:bg-muted focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-none\"\n        >\n          <Icon name=\"cloud_upload\" className=\"size-icon-3xl text-muted-foreground\" aria-hidden />\n          <span className=\"text-sm font-medium text-foreground\">\n            Drag files here or click to browse\n          </span>\n          <span className=\"text-xs text-muted-foreground\">Your files stay private.</span>\n        </button>\n        <Separator />\n        <ul className=\"flex flex-col gap-3\" aria-label=\"Upload queue\">\n          {files.map((f) => (\n            <li key={f.name} className=\"flex items-center gap-3\">\n              <span className=\"flex size-9 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground\">\n                <Icon name={f.state === 'done' ? 'check' : 'draft'} className=\"size-icon-lg\" aria-hidden />\n              </span>\n              <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n                <div className=\"flex items-baseline justify-between gap-2\">\n                  <span className=\"truncate text-sm font-medium text-foreground\">{f.name}</span>\n                  <span className=\"shrink-0 text-xs text-muted-foreground\">{f.size}</span>\n                </div>\n                {f.state === 'uploading' && (\n                  <Progress value={f.progress} aria-label={`Uploading ${f.name}`} />\n                )}\n              </div>\n              <Button variant=\"ghost\" size=\"icon-sm\" aria-label={`Remove ${f.name}`}>\n                <Icon name=\"close\" />\n              </Button>\n            </li>\n          ))}\n        </ul>\n      </CardContent>\n      <CardFooter className=\"justify-end gap-2\">\n        <Button variant=\"ghost\">Cancel</Button>\n        <Button>Done</Button>\n      </CardFooter>\n    </Card>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/quill/file-upload.tsx"
    }
  ],
  "meta": {
    "intent": [
      "form"
    ],
    "use_when": "You need drag-and-drop asset upload with a progress-tracked queue.",
    "not_for": "you need a single attachment inside a broader form, not a dedicated upload queue as the whole card → contact-form"
  },
  "docs": "An asset-upload card with a drag-and-drop dropzone and a progress-tracked upload queue. Do: Make the dropzone a real, focusable <button> that also opens a file picker on click/Enter — never make drag-and-drop the only way in. Don't: Ship a dropzone that only responds to a pointer drag gesture. Do: Give each in-progress file its own progress bar, so users can see exactly how far each individual upload has gotten. Don't: Show one shared progress bar for the whole queue — users can't tell which file it belongs to or how far any single file has gotten. Use contact-form when you need a single attachment inside a broader form, not a dedicated upload queue as the whole card.",
  "categories": [
    "form"
  ],
  "type": "registry:block"
}