UADetect OS Componet

Description

Get's the name of the Operating System that the client is using.

Possible Returns

  • Windows
  • Mac
  • Linux
  • Android
  • iOS
  • unknown

Usage Example

#1

import { OS } from 'uadetect';if (OS === 'Windows') {  element.innerHTML = 'Download on the Microsoft Store!';}

#2

import { OS } from 'uadetect';if (OS === 'Mac') {  element.innerHTML = 'Download on the Mac App Store!'}