DownloadItem
Download link primitive for manuals, care guides, technical sheets, and other supporting files.
Best for
Import
import { DownloadItem } from "@enadhq/enad-react-sdk/client/storefront"When to use it
Use DownloadItem when the file itself is the action. It works well for manuals, compliance PDFs, assembly guides, and product attachments that need a clearer presentation than a plain text link.
Choose the card variant when the file should stand on its own. Choose the inline variant when it is part of a denser list.
Composition notes
label and url are the core inputs. Add fileType when the file format matters to the visitor before they click.
variant="card" gives the download more weight. variant="inline" keeps the row compact for specification panels and grouped attachment lists.
Pass icon when a download row needs a local branded glyph or a different document cue without replacing the primitive.
Use classNames when a storefront needs local root, content, label, badge, or icon styling without creating a wrapper component just to restyle the primitive.
Behavior and theming guidance
Keep labels explicit so the visitor knows what opens before clicking. File type badges work best as a supplement, not the only description.
Prefer the default icon path for system-wide consistency. Reach for the icon prop when a specific document list needs local visual parity that should not change the rest of the storefront icon set.
Prefer classNames over descendant-selector wrapper hacks when a brand needs local polish. The shared slots are the supported styling seam.
Examples
Live examples you can edit directly in the sandbox.
Card download
Use the default card treatment when a file should read as a standalone supporting resource.
Inline document list
Switch to the inline variant when several files should stack tightly inside product details or accordion content.
Custom icon override
Pass a local icon when the download row needs a branded glyph without rebuilding the primitive.
Slot-level classNames
Use the shared slot classNames seam when a brand app needs local polish without forking the primitive.
Slots
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | Display name shown on the download row |
| url | string | — | URL of the file to download |
| fileType | string | — | Short file type badge rendered next to the label (e.g. "PDF", "ZIP") |
| icon | string | — | Optional custom icon for branded or context-specific file rows |
| className | string | — | No description yet. |
| classNames | Partial<Record<DownloadItemSlot, string>> | — | Optional slot-level class names for styling the root, content, label, file type badge, and icon wrapper without rebuilding the primitive Slot keys labelcontentrootfileTypeicon |
| variant | string | card | Visual presentation of the download row |