Fidely UI v1 beta is now available!. 🚀

Download Trigger

Used to trigger file downloads programmatically.

Usage

import { DownloadTrigger } from '@fidely-ui/react'
<DownloadTrigger />

Examples

File Size

Use the DownloadTrigger with the FormatByte component to display the size of the file in a human-readable format.

Svg

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

Props

PropTypeDefaultDescription
data-—The data to download.
fileNamestring-The name of the file to download.
mimeTypeFileMimeType-The MIME type of the data to download.
asChildbooleanfalseUse the provided child element as the default rendered element, combining their props and behavior.

On this page