Ark UI Logo
Undefined
Utilities
Download trigger

Download Trigger

Trigger file downloads programmatically.

Motivation

The DownloadTrigger component provides a convenient way to programmatically trigger file downloads in web applications. It handles the complexities of downloading files, whether they are URLs, Blobs, or other data types.

Examples

Basic

Pass the data you want to download to the data prop, and specify the fileName and mimeType of the file.

Download SVG

Here's an example of how to download an SVG file.

Promise

You can also trigger downloads from a promise that returns a Blob, File, or string.

API Reference