Theme Playground

Storefront

DownloadItem

Download link primitive for manuals, care guides, technical sheets, and other supporting files.

Best for

manualstechnical sheetsproduct attachments

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.

4 examples

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

labelcontentrootfileTypeicon

Component Sets

Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.

Props

PropTypeDefaultDescription
labelstring
Display name shown on the download row
urlstring
URL of the file to download
fileTypestring
Short file type badge rendered next to the label (e.g. "PDF", "ZIP")
iconstring
Optional custom icon for branded or context-specific file rows
classNamestring
No description yet.
classNamesPartial<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
variantstringcard
Visual presentation of the download row