How to Create a Download for MacOS Button (only Visible to Mac Users)

This post will teach you how to create a macOS download button that only appears for Mac users, why targeting Mac-specific downloads improves user experience, and how our Webflow cloneable makes implementation quick and simple.

TABLE OF CONTENTS
Ovidiu

How to create a download for macOS button (only visible to Mac users)

Other use-cases using Memberscript #120: 

  • How to automatically hide/show elements to mobile visitors
  • How to automatically hide/show elements to desktop visitors
  • How to automatically hide/show elements to users on a touch screen device
  • How to automatically hide/show elements to users with a device in portrait mode
  • How to automatically hide/show elements to iOS visitors
  • How to automatically hide/show elements to android visitors
  • How to automatically hide/show elements to macOS visitors
  • How to create a download in App Store button (only visible to iOS users)
  • How to create a download in Play Store button (only visible to android users)
  • How to create a download for macOS button (only visible to Mac users)
  • How to create a download for Windows button (only visible to Windows users)
  • How to create a download for Linux button (only visible to Linux users
  • How to create a download Chrome Extension button (only visible to Chrome users)
  • How to automatically hide/show elements to Windows visitors
  • How to automatically hide/show elements to Linux visitors
  • How to automatically hide/show elements to visitors using Chrome
  • How to automatically hide/show elements to visitors using Edge
  • How to automatically hide/show elements to visitors using Safari
  • How to automatically hide/show elements to visitors using Firefox
  • How to automatically hide/show elements to visitors using Opera
  • How to tell your visitors to stop using Internet Explorer

Memberscripts needed: 

https://www.memberstack.com/scripts/device-os-browser-visibility

Tutorial:

Cloneable: 

Why/Use Cases

-          Control the visibility of elements on your website based on your visitors’ device, OS, screen orientation, browser, and more.

Creating a download for macOS button for Mac visitors on a Webflow site

Since not every element on your site may be relevant to all users, you can decide when to show or hide them based on factors like OS, browser, or device type.

For example, iOS users might see an App Store button, while Android users get a Play Store button. On desktops, you may choose to remove both, instead displaying an App Store link for macOS users and a Microsoft Store link for Windows users.

This guide will walk you through creating a download for macOS button that is only visible to macOS visitors.

To create a download for macOS button only for Mac users, we’re going to use MemberScript #120 – Show/Hide Element Based On Device, OS, or Browser. Follow the link to get the code you’ll need to add to your page and watch a video tutorial on how to set everything up.

Setting it up

After you’ve created the download button, use the ms-code-device-show attribute to only display it to Mac users. To achieve this, just use “macos” as the value.

The attribute ms-code-device-show=”macos” will ensure the button is only visible on Mac devices.

If you want to do the opposite and show it everywhere else except on Mac devices, just add an exclamation point before the value:

· ms-code-device-show”!macos” – this hides the element on Mac devices and displays it on everything else

You can also use combinations of multiple conditions with & for “and” and | (vertical line, not capital “i”) for “or,” like so:

· ms-code-device-show=”ios&android” – shows the element on iOS  and Android devices

· ms-code-device-show=”ios|macos” – shows the element on either iOS or macOS

For a full list of available values, see our cloneable page.

Making it work

Now that you’ve got everything set up in Webflow, all you need to do is add the MemberScript #120 custom code to your page (or sitewide), before the closing body tag.

Conclusion

That’s everything, you can now go ahead and test the button on your live site.

If you want to use our demo project to get you started, just click the button below to add it to your Webflow site.

Our demo can help you show or hide elements on your Webflow site based on visitors’ devices, OSes, browsers, and more.

Take me to Cloneable!

Add memberships to your Webflow project in minutes.

Learn more

Over 200 free cloneable Webflow components. No sign up needed.

View Library

Add memberships to your React project in minutes.

Get started
What is Memberstack?

Auth & payments for Webflow sites

Add logins, subscriptions, gated content, and more to your Webflow site - easy, and fully customizable.

Learn more
Start building

Try out Memberstack & discover what you can build!

Memberstack is 100% free until you're ready to launch - so, what are you waiting for? Create your first app and start building today.