Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Hello, World! This is a sample text file.
Installation
pnpm add @ark-ui/react lucide-react.json
Usage
import { DownloadTrigger } from "@/components/ui/download-trigger";
<DownloadTrigger data="..." fileName="schema.json" mimeType="application/json" > Download </DownloadTrigger>
Examples
Download SVG
Download an SVG file by passing the SVG markup to data and setting mimeType to image/svg+xml.
Promise
Trigger downloads from a promise that returns a Blob, File, or string. Pass a function to data.
API Reference
DownloadTrigger
| Prop | Type | Default |
|---|---|---|
data | DownloadableData | (() => MaybePromise<DownloadableData>) | - |
fileName | string | - |
mimeType | FileMimeType | - |
asChild | boolean | - |
For a complete list of props, see the Ark UI documentation.