Skip to content

No.47 · Buttons· New

Platform Downloads

Download and store buttons with the platform marks (macOS, Windows, Linux, App Store, Google Play, Microsoft Store, Android) in solid, outline and light styles, plus a block that puts the visitor's own system first with the right build chosen, a split menu for the other builds and a copyable install command.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Light

Build download buttons for a desktop and mobile app (a fictional 'Qalam' 2.4.1). Badges: an inline 52px button (64px large) with an 11px radius, the platform mark at 27px on the left, and two lines: a small 10.5px top line ('Download for', 'Download on the', 'Get it on', 'Get it from') over an 18px semibold name. Marks are single-colour SVGs in currentColor (Apple, the four-square Windows mark, a penguin, the Android robot head, a shopping bag with four squares) except the Play triangle, which keeps its four colours. Three styles: solid (near-black with a 1px grey edge, like store badges), outline (transparent with a 1.5px hairline) and light (white with a soft shadow). Hover lifts 1px, nudges the mark and slides a soft diagonal sheen across once; press moves down 1px. Block: a 18px-radius card. Heading 'Qalam for macOS' and 'Version 2.4.1 · 2 October 2026'. A large split button: the left part is the download link (mark, 'Download for macOS', and 'Apple silicon · .dmg · 84 MB' under it), the right part a caret that opens a menu of builds as menuitemradio rows (label, recommended tag on the build matching the detected architecture, format and size). Under it the install command in mono with a $ prompt and a Copy button that turns green 'Copied'. A hairline, then 'Other platforms ▾' revealing outline badges for the other systems and the stores. On iOS or Android the primary becomes the App Store or Google Play badge. Unknown systems see every option. Detection: the user agent plus userAgentData (platform and high-entropy architecture), checking Android before Linux and treating a touch 'Macintosh' as an iPad. It runs after hydration; a detected prop forces it. Selected variant — Light (light): Apply the light theme. Where the brief above gives no colour values for it, choose a restrained light palette with text at 4.5:1 contrast or better. Keep the geometry, states and motion described above unchanged. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Badges are links. The caret opens the build menu (ArrowDown also opens it); ↑/↓, Home and End move, Enter picks, Escape or Tab closes and returns focus. Copy writes the command to the clipboard and announces it. 'Other platforms' is a disclosure. Motion: Hover lift, mark nudge and a one-pass sheen; the menu and the platform list drop in over 0.15s. All removed with reduced motion. Accessibility: Real links and buttons; the caret has aria-haspopup, aria-expanded and a label naming the current build; menu rows are menuitemradio with aria-checked. Marks are aria-hidden because the visible text names the platform. Responsive behavior: Badges wrap. Below 520px the split button spans the width and the build line may wrap. Touch: Every control is a tap target; nothing depends on hover. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Badges are links. The caret opens the build menu (ArrowDown also opens it); ↑/↓, Home and End move, Enter picks, Escape or Tab closes and returns focus. Copy writes the command to the clipboard and announces it. 'Other platforms' is a disclosure.
Motion
Hover lift, mark nudge and a one-pass sheen; the menu and the platform list drop in over 0.15s. All removed with reduced motion.
Accessibility
Real links and buttons; the caret has aria-haspopup, aria-expanded and a label naming the current build; menu rows are menuitemradio with aria-checked. Marks are aria-hidden because the visible text names the platform.
Responsive
Badges wrap. Below 520px the split button spans the width and the build line may wrap.
On touch
Every control is a tap target; nothing depends on hover.

Featured

373 components