diff --git a/fern/products/docs/pages/changelog/2026-03-12.mdx b/fern/products/docs/pages/changelog/2026-03-12.mdx index 5990fe994..dfeda4124 100644 --- a/fern/products/docs/pages/changelog/2026-03-12.mdx +++ b/fern/products/docs/pages/changelog/2026-03-12.mdx @@ -1,7 +1,28 @@ --- -tags: ["navigation", "configuration", "docs.yml"] +tags: ["components", "navigation", "configuration", "docs.yml"] --- +## Multi-file ZIP downloads + +The `` component now supports bundling multiple files into a single ZIP download using the new `sources` prop. This is useful when you want users to download a collection of related assets — such as brand logos, SDK files, or configuration templates — without needing to host a pre-built ZIP file. + +Pass an array of publicly accessible URLs to `sources`, and the component fetches each file client-side and packages them into a ZIP archive: + +```jsx Markdown + + + +``` + + + ## `open-by-default` option for collapsed sections Sections and folders in your sidebar navigation support a new `collapsed: open-by-default` value. Sections configured with this value start expanded but display a toggle so users can collapse them. diff --git a/fern/products/docs/pages/component-library/default-components/download.mdx b/fern/products/docs/pages/component-library/default-components/download.mdx index e2d5ec1b2..d44394d16 100644 --- a/fern/products/docs/pages/component-library/default-components/download.mdx +++ b/fern/products/docs/pages/component-library/default-components/download.mdx @@ -1,11 +1,11 @@ --- title: Download -description: The Download component enables users to download PDFs and files from your documentation. Simple setup with custom filenames. +description: The Download component enables users to download PDFs, files, and multi-file ZIP bundles from your documentation. --- -The `` component lets users download assets like PDFs directly from your documentation. +The `` component lets users download assets like PDFs directly from your documentation. You can use it for single files or bundle multiple files into a ZIP download. For information on how to embed images, PDFs, and other assets, check out the documentation on [Rich media in Markdown](/learn/docs/writing-content/markdown-media). @@ -13,10 +13,14 @@ For information on how to embed images, PDFs, and other assets, check out the do ## Usage +### Single file +
- - - +
+ + + +
```jsx Markdown @@ -25,16 +29,39 @@ For information on how to embed images, PDFs, and other assets, check out the do
``` +### Multiple files as ZIP + +Use the `sources` prop to bundle multiple files into a single ZIP download. The component fetches each file client-side and packages them into a ZIP archive using [fflate](https://github.com/101arrowz/fflate). + +This is useful when you want users to download a collection of related assets — such as brand logos, SDK files, or configuration templates — without needing to host a pre-built ZIP file. + +```jsx Markdown + + + +``` + ## Properties - - Path to your local asset (relative to current MDX file). The asset must be located within the `fern` folder. + + Path to a single file for download (relative to the current MDX file). The asset must be located within the `fern` folder. Use `src` for **single-file downloads**. Mutually exclusive with `sources` — you must provide one or the other. + + + + An array of publicly accessible URLs to bundle into a ZIP download. Use `sources` for **multi-file downloads** — the component fetches each URL client-side and packages them into a ZIP archive. Mutually exclusive with `src`. If only one URL is provided, it behaves like `src` (downloads the file directly without zipping). The filename for each file inside the ZIP is derived from the last segment of its URL (e.g., `logo-dark.svg`). If any file fails to fetch, the entire download will fail. - The text or element to display as the click target for the download. + The text or element to display as the click target for the download. Typically a `