Download Page
v1.0.0Added in 1.8.0
An apps download page: OS-aware hero download, a drawn desktop app and phone, a platform picker with files, commands and checksums, and FAQ.
The hero rises in once on mount. Its download button adapts to the visitor's device after hydration (macOS on the server, so the markup never mismatches): Download for macOS, Windows or Linux, Get Acme for iPhone or Android; the line under it shows the variant, version, size and release date, and the other formats (Intel, MSI, .rpm) download from inline links. Under it a drawn desktop app wears macOS traffic lights, Windows caption buttons or a GNOME header bar to match, with a phone, quick add and a notification around it. The platform picker is a tab row (arrow keys, Home and End; a swipeable rail on phones) that opens a panel per platform: download rows, Homebrew, winget, Snap or npm commands with copy buttons, requirements, a SHA-256 with copy, and a drawing (a DMG window, an installer, a terminal, a QR code, a browser extension). Download buttons spin, toast the file name and turn the panel into a thanks state with three drawn install steps, Try again and Back to downloads. The Beta channel switch in the panel and the Stable / Beta segmented control in the release notes share one state and change every version, file name, command and checksum on the page. Desktop features show their real shortcuts, the system requirements table becomes cards below 768px, and the FAQ opens one answer at a time. Reduced motion keeps everything still.
Built with
The sections this page is made of. In the full-screen preview, hold Alt to outline each one on the page.
Add to a project
npx wingo-ui@latest add download-pagePro item: the CLI needs a Pro account. See plans
Usage
// app/(marketing)/download/page.tsx
"use client"
import Link from "next/link"
import { DownloadPage } from "@/components/templates/download-page"
const FILES: Record<string, string> = {
"mac:arm64": "https://downloads.acme.com/Acme-latest-arm64.dmg",
"windows:exe": "https://downloads.acme.com/AcmeSetup-latest.exe",
}
export default function DownloadRoute() {
return (
<DownloadPage
linkComponent={Link}
ctaTone="brand"
onDownload={(platform, variant) => {
const url = FILES[`${platform}:${variant}`]
if (url) window.location.assign(url)
}}
/>
)
}Props
designdefault"classic""classic" | "bold" | "minimal"The whole page's look. classic follows the layout props; bold: a pill header, a giant start-aligned title on a gradient mesh with the download beside the description, rounder panels, a colored mobile card, FAQ cards, a scene band and a wordmark footer; minimal: a transparent header, no glow or floating cards, outlined flat panels, no gray bands and a simple footer. The *Props overrides still win.
platformdefault"auto""auto" | "mac" | "windows" | "linux" | "ios" | "android" | "extension" | "cli"The platform the hero button downloads and the picker opens on. auto detects the visitor's device after hydration and renders macOS on the server; a value pins it (and the drawn window's chrome).
channel"stable" | "beta"The release channel, controlled. Every version, file name, install command and checksum follows it. Leave it out to let the page own it.
defaultChanneldefault"stable""stable" | "beta"The channel while uncontrolled: beta shows the 3.3.0-beta.2 files, commands and notes from the first render.
onChannelChange(channel: DownloadChannel) => voidRuns when the Beta channel switch or the Stable / Beta control changes.
platformsdefault"DOWNLOAD_PLATFORMS"DownloadPlatform[]The picker: { id, name, short, icon?, kind, tagline, meta, variants, commands?, requirements, visual, lines?, qr?, steps } per platform. A variant is { id, label, detail?, file? ({version} filled in), size?, recommended?, store?, action?, href?, checksum? }.
releasesdefault"DOWNLOAD_RELEASES"Record<DownloadChannel, DownloadRelease>{ stable, beta }: { version, date (yyyy-mm-dd), notes: { type, text }[] } per channel.
featuresdefault"DOWNLOAD_FEATURES"DownloadFeature[]Desktop features: { id, icon?, title, description, shortcut?, shortcutLabel?, visual? }; visual is quick-add, offline, notifications, menu-bar or any node.
requirementsdefault"DOWNLOAD_REQUIREMENTS"DownloadRequirement[]{ id, platform, icon?, os, processor, memory, disk } rows of the requirements table.
enterprisedefault"DOWNLOAD_ENTERPRISE_POINTS"DownloadEnterprisePoint[]{ icon?, title, description } points of the IT deployment panel.
faqdefault"DOWNLOAD_FAQ"FaqItem[]{ question, answer } pairs about installing.
labelsdefault"DEFAULT_DOWNLOAD_PAGE_LABELS"Partial<DownloadPageLabels>Every visible string; the ones with a name, file or version are functions.
hrefsdefault"DEFAULT_DOWNLOAD_PAGE_HREFS"Partial<DownloadPageHrefs>{ changelog, sales, guide, web }: release notes, contact, the admin guide and the web app.
showAnnouncementdefaulttruebooleanThe strip above the header bar.
showPickerdefaulttruebooleanThe platform picker and its download panel.
showFeaturesdefaulttruebooleanThe desktop features with their shortcuts.
showMobiledefaulttruebooleanThe mobile apps section (AppDownloadSection).
showReleaseNotesdefaulttruebooleanThe latest release notes and the release channel card.
showRequirementsdefaulttruebooleanThe system requirements table (cards on phones).
showEnterprisedefaulttruebooleanThe IT deployment panel.
showFaqdefaulttruebooleanThe FAQ.
showCtadefaulttruebooleanThe closing call to action.
showPhonedefaulttruebooleanThe phone overlapping the drawn desktop app. Applies to the classic and minimal designs.
ctaVariantdefault"inverted""inverted" | "soft" | "split"The closing band: a solid band, a gray band, or copy beside the buttons on a raised panel. Applies to the classic design.
alternatedefaulttruebooleanGray bands on every other visible section. Applies to the classic and bold designs.
phoneColordefault"#0A0A0A"stringThe frame of the drawn phones.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"Accents: the hero glow, the drawn apps and app icon, the selected platform, icon tiles, checks, steps and the channel controls.
ctaTonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The download buttons, Talk to sales, the header's Get started and the closing band; brand is the marketing orange.
headerdefaulttruebooleanThe marketing header; off inside a site layout.
footerdefaulttruebooleanThe marketing footer with its newsletter form.
headerPropsPartial<MarketingHeaderProps>Passed to MarketingHeader.
footerPropsPartial<MarketingFooterProps>Passed to MarketingFooter.
mobilePropsPartial<AppDownloadSectionProps>Overrides for the mobile AppDownloadSection (stores, layout, qrValue...).
faqPropsPartial<FaqSectionProps>Overrides for the FaqSection.
ctaPropsPartial<CtaSectionProps>Overrides for the CtaSection.
onDownload(platform: DownloadPlatformId, variant: string, channel: DownloadChannel) => (void | Promise<unknown>)Every download and store button. A returned promise keeps the button loading and a rejection toasts downloadFailed; then the panel shows the install steps. Without it the button spins for 700 ms, toasts the file name and shows the steps.
onSubscribe(email: string) => (void | Promise<unknown>)The footer newsletter; a rejected promise shows an error.
toastOptionsdefault"{}"ToastOptions | falseOptions for the download toasts ({ toasterId, duration... }); false sends none. A Toaster must be mounted to see them.
animateIndefaulttruebooleanThe hero rises in once on mount; false keeps the page still (thumbnails). Reduced motion always does.
localedefault"en-US"stringIntl locale for the release dates.
linkComponentdefault"<a>"(props: LinkComponentProps) => ReactNodeThe router link for every link on the page (next/link in an app).
classNamestringClasses for the root.
classNamesPartial<Record<DownloadPageSlot, string>>Classes for header, hero, title, download, shot, picker, tile, panel, thanks, features, feature, mobile, release, requirements, enterprise, faq, cta and footer.
Parts
DOWNLOAD_PAGE_SAMPLE
constantAll the sample content in one object: platforms, releases, features, requirements, enterprise and faq.
DOWNLOAD_PLATFORMS
constantSeven platforms: macOS, Windows, Linux, iPhone and iPad, Android, the web extension and the CLI, with files, commands and install steps.
DOWNLOAD_RELEASES
constantThe stable 3.2.1 and beta 3.3.0-beta.2 releases with their notes.
DOWNLOAD_FEATURES
constantFour desktop features: quick add, offline, native notifications and the menu bar widget.
DOWNLOAD_REQUIREMENTS
constantRequirement rows for macOS, Windows, Linux, iOS and Android.
DOWNLOAD_ENTERPRISE_POINTS
constantPackages, MDM, SSO and SCIM, and update rings.
DOWNLOAD_FAQ
constantSix questions about price, Apple silicon vs Intel, updates, the beta, offline use and checksums.
DEFAULT_DOWNLOAD_PAGE_LABELS
constantThe English strings.
DEFAULT_DOWNLOAD_PAGE_HREFS
constantThe default link targets.
DOWNLOAD_PAGE_DESIGNS
constantThe design names, classic first: ["classic", "bold", "minimal"].
DownloadPageProps
typeProps of DownloadPage.
DownloadPageDesign
type"classic" | "bold" | "minimal".
DownloadPagePlatform
typeA platform id or "auto".
DownloadPlatformId
type"mac" | "windows" | "linux" | "ios" | "android" | "extension" | "cli".
DownloadChannel
type"stable" | "beta".
DownloadPlatform
typeOne platform of the picker.
DownloadVariant
typeOne file or store listing of a platform.
DownloadRelease
typeA channel's version, date and notes.
DownloadFeature
typeOne desktop feature card.
DownloadRequirement
typeOne row of the requirements table.
DownloadPageLabels
typeThe strings labels can override.
DownloadPageHrefs
typeThe link targets hrefs can override.
Examples
Bold design
design="bold": a giant start-aligned title on a gradient mesh, the download beside the description, a colored mobile card and a wordmark footer.
Minimal design
design="minimal": a transparent header, no glow or floating cards, outlined flat panels and no gray bands.
Windows visitor on the beta
platform="windows" and channel beta: Windows window chrome, Download for Windows, 3.3.0-beta.2 files and winget beta commands.
Brand orange, Linux
tone and ctaTone brand on a Linux visitor: an orange glow, GNOME window chrome, the .deb as the hero download and a split closing panel.
Real downloads
onDownload returns a promise: the button spins for 1.2 s, then the install steps show; every call toasts what a real app would fetch.
Dependencies
Files
- components/templates/download-page.tsx
- components/templates/download-page-data.ts