# Download: platform cards

> Download options with platform descriptions and optional download links.

- Kind: block · Category: Download · Interactivity: native
- Install: `npx shadcn@latest add @haze/download-platform-cards`
- File: `src/components/haze/blocks/download-platform-cards.astro`
- npm dependencies: @lucide/astro
- Registry dependencies: @haze/utils
- Docs page: https://hazeui.com/blocks/download-platform-cards

## Use when
- A product has separate desktop and mobile downloads
- Visitors need a short explanation of each available app

## Avoid when
- The options are integrations with other products; use integrations-card-grid

## Alternatives
- [integrations-card-grid](https://hazeui.com/blocks/integrations-card-grid.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | "download-platform-cards" | no | Unique section ID prefix. |
| eyebrow | `string` | "Take it with you" | no | Label above the heading. |
| title | `string` | demo heading | no | Download section heading. |
| description | `string` | demo copy | no | Introduction; the default marks platform entries as examples. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Heading level; platform names use the next level. |
| platforms | `{ name: string; detail: string; kind: 'desktop' \| 'mobile'; href?: string }[]` | 2 example platforms | no | Platforms and their download URLs. Entries without URLs show an example label. |
| class | `string` |  | no | Additional section classes. |

## Accessibility
- Platform names are headings inside a list and the icons are decorative.
- Download links include the platform name; entries without a URL have no inactive link.
- Key Tab: Reach available download links.

## Agent prompts

### Install and use

Install the Haze UI block "Download: platform cards" with `npx shadcn@latest add @haze/download-platform-cards`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "https://hazeui.com/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import DownloadPlatformCards from "@/components/haze/blocks/download-platform-cards.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: https://hazeui.com/blocks/download-platform-cards.md

### Customize with real content

Adapt the Haze download-platform-cards block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, platforms, class. Keep the layout, the heading level rules and these accessibility details: Platform names are headings inside a list and the icons are decorative. Download links include the platform name; entries without a URL have no inactive link. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using download-platform-cards, check it fits: use it when a product has separate desktop and mobile downloads; visitors need a short explanation of each available app. Avoid it when the options are integrations with other products; use integrations-card-grid. Alternatives: @haze/integrations-card-grid.

## Example requests that should lead here
- Present desktop and mobile app downloads in two clear cards

## Source

```astro
---
import { ArrowDownToLine, Monitor, Smartphone } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";

interface Props {
  id?: string;
  eyebrow?: string;
  title?: string;
  description?: string;
  headingLevel?: 1 | 2 | 3;
  platforms?: { name: string; detail: string; kind: "desktop" | "mobile"; href?: string }[];
  class?: string;
}

const {
  id = "download-platform-cards",
  eyebrow = "Take it with you",
  title = "Your workspace, close at hand",
  description = "Choose the version that fits how you work. The platforms below are examples.",
  headingLevel = 2,
  platforms = [
    { name: "Desktop app", detail: "For your desk and the workday ahead", kind: "desktop" },
    { name: "Mobile app", detail: "For a quick check-in on the move", kind: "mobile" },
  ],
  class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
const PlatformHeading = ({ 1: "h2", 2: "h3", 3: "h4" } as const)[headingLevel];
---

<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
  <div class="mx-auto max-w-5xl">
    <div class="max-w-2xl">
      <p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
      <Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
      <p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
    </div>
    <ul class="mt-12 grid gap-4 sm:grid-cols-2">
      {platforms.map((platform) => {
        const Icon = platform.kind === "desktop" ? Monitor : Smartphone;
        return (
          <li class="rounded-xl border border-border bg-card p-6 sm:p-8">
            <span class="flex size-11 items-center justify-center rounded-lg bg-foreground/5 text-foreground inset-ring inset-ring-frame"><Icon aria-hidden="true" class="size-5" /></span>
            <PlatformHeading class="mt-5 text-lg/7 font-semibold tracking-tight text-foreground">{platform.name}</PlatformHeading>
            <p class="mt-2 text-sm/6 text-muted-foreground">{platform.detail}</p>
            {platform.href ? <a href={platform.href} class="mt-6 inline-flex min-h-9 items-center gap-2 rounded-sm text-sm/5 font-medium text-foreground underline underline-offset-4 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring"><ArrowDownToLine aria-hidden="true" class="size-4" />Download {platform.name}</a> : <p class="mt-6 text-[0.8125rem]/5 text-muted-foreground">Example download</p>}
          </li>
        );
      })}
    </ul>
  </div>
</section>
```
