---
id: download-trigger
title: Download Trigger
description: 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.

<Example id="basic" />

### Download SVG

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

<Example id="svg" />

### Promise

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

<Example id="with-promise" />

## API Reference

<ComponentTypes id="download-trigger" />
