A list of files to download (press kit, brand assets, templates, datasets) with format and size. Each row downloads on its own; ticked rows download together as one ZIP built in the browser with no dependency. Files can be hosted (href) or generated on demand (data), and a file that fails to fetch is listed in a note inside the archive instead of breaking it.
Logo, light background
logo-light.svgSVG · 190 byte
Logo, dark background
logo-dark.svgSVG · 190 byte
Fact sheet
fact-sheet.txtTXT · 160 byte
Founding year, team size, contactBrand colours
colours.jsonJSON · 80 byte
Installation
The whole kit as one package — get updates by bumping the version. Add the styles to globals.css: @import "@vamos-ui/react/styles.css";
Usage
import { DownloadKit } from "@vamos-ui/react";
<DownloadKit archiveName="press-kit" assets={[
{ id: "logo", name: "Logo, light background", file: "logo.svg", href: "/press/logo.svg", format: "SVG", size: 4_200 },
{ id: "facts", name: "Fact sheet", file: "facts.txt", data: () => factSheetText, format: "TXT" },
]} />The ZIP fetches hosted files, so they must be same-origin or allow CORS; the single download of a hosted file is a plain link and has no such limit.
Progress and results go to a polite status line. Select all is tri-state and every row checkbox is named after its file.
Stored ZIPs are not compressed: fine for images, PDFs and archives; compress large text datasets on the server.
Examples
Links only
selectable={false}: hosted files become plain download links that work without JavaScript.
API
DownloadKit
| Prop | Type | Default |
|---|---|---|
assets{ id, name, file, size? (bytes), format?, description?, preview?, icon?, href?, data? }. data (string, bytes, Blob or a promise) wins over href. | DownloadAsset[] | — |
selectableCheckboxes, select all and the ZIP button. | boolean | true |
selected / defaultSelected / onSelectedChangeSelected ids (default: all). | string[] | — |
archiveNameZIP name without .zip, also the folder inside it. | string | "downloads" |
onDownloadAfter a file or the archive is saved (analytics). | ({ ids, file, size, kind }) => void | — |
labelsDictionary namespace "downloadKit". | Partial<DownloadKitLabels> | — |
createZip(entries, date?)
| Prop | Type | Default |
|---|---|---|
returnsA stored (uncompressed) ZIP with UTF-8 names from { name, data: Uint8Array }[]. | Blob | — |