shadcn.io is not affiliated with official shadcn/ui
Brand Assets File Upload Block for Vue
Four drop targets for a brand kit, Logos as SVG, Icons as PNG, Banners and Social as PNG or JPG, each with its own accept, size limit and file count, and a refusal that names the rule it broke.
Installation
Overview
Give every kind of asset its own rules, with this brand kit panel for Vue with Ark UI. It is the asset page of Crestkit, storage for a design studio. Four cells share hairlines: Logos take SVG only up to 256 KB, Icons take PNG up to 512 KB, Banners take PNG or JPG up to 2 MB and Social takes PNG or JPG up to 1 MB. Each cell is its own File Upload with its own accept and maxFileSize, shows its rules as Badges, holds a fixed number of files ("2 of 4") and lists what it took with a drawn stand-in for a thumbnail. A refusal names the rule: "poster.gif is not SVG: Logos take SVG only." or "hero.png is 3.1 MB, over the 2 MB limit for Banners." A full cell says it is full. Seven files are typed to start. The panel is ruled by Guides. For brand kits, media libraries and any upload where each slot has a spec.
FAQ
Are the rules real?
Type and size are. Each cell passes its own accept and maxFileSize to the drop zone, so the picker and the zone refuse the wrong type or a file that is too big, and the refusal handler writes which rule was broken. The file count is enforced by the block. Square icons and image dimensions are the rules the browser cannot check without opening a file, and this block never does, so those rows say "not checked in this demo" for a picked file; the seeded files carry typed sizes.
Where do the thumbnails come from?
They are drawn. Each is three or four shapes chosen by the cell and a number made from the file's name, so the same name always draws the same picture. A picked file is never read or previewed, so no object URL is created.
What happens when a cell is full?
Files past its count are not added, and the cell's line says how many were left out. Remove a file and the room comes back. After a removal focus moves to the next file's Remove button, or to the cell's drop zone when the list is empty.