Skip to content

Download Button

The Download Button renders a recognisable app-store badge for Google Play, Apple App Store, or Huawei AppGallery. On desktop and tablet screens it displays the full branded badge artwork; on mobile it collapses to the store’s logo icon only, keeping the layout compact.

The component accepts props for store, size, and variant, and .

Loading Code Block...

A basic download button targeting Google Play with the default brand variant.

Loading Code Block...

The store prop determines which app-store badge is rendered. Three stores are supported: google, apple, and huawei. Each store has its own branded artwork and logo icon.

google
apple
huawei
Loading Code Block...

Two sizes are available: md (40px height) and lg (45px height). The button width is fixed at 140px (max 180px) on desktop and auto-sizes on mobile.

md
lg
Loading Code Block...

The variant prop controls the visual style of the button. Use brand for the standard dark badge or outline for a lighter, bordered appearance that works well on dark backgrounds. Use the store dropdown to swap badge artwork — the code snippet updates to match.

brand
outline
Loading Code Block...

The Download Button adapts automatically based on viewport width.

ViewportLayout
Below md (~768 px)Only the store logo icon is shown (compact mobile layout).
md and aboveFull branded badge artwork is displayed inside a bordered container.

Under the hood, the component renders two sibling <div> elements — the full badge is wrapped in hidden md:flex and the logo icon is wrapped in flex md:hidden, so only one is visible at any breakpoint. The desktop badge SVG uses the same sizeStyles lookup as the mobile logo, so React and Vue render at identical pixel dimensions across md and lg.

Desktop / Tablet (≥ 768px):
┌────────────────────────────────┐
│ ┌──────────────────────────┐ │
│ │ Full Badge Artwork │ │
│ │ (w: 140px, max: 180px) │ │
│ │ with variant styling │ │
│ └──────────────────────────┘ │
└────────────────────────────────┘
Mobile (< 768px):
┌──────────┐
│ Logo │
│ Icon │
└──────────┘

VariantBackgroundBorderBest used on
brandbg-neutral-900border border-neutral-400Light backgrounds
outlinebg-whiteborder border-neutral-900Dark or coloured backgrounds
  • The component renders a <div> with an onClick / @on-click handler. For better semantics, wrap it in an <a> tag pointing to the store URL, or set role="link" and tabindex="0" on the container.
  • Ensure the store badge conveys the download action to screen readers — consider adding aria-label (e.g. aria-label="Download on Google Play") on the wrapping element.
  • The mobile logo icon is purely visual; it inherits the parent click handler and does not need separate interactive treatment.